I have the following PHP file that is supposed to check mySQL for correct password
then direct to user main page.
Problem: header line does not seem to be working!!! —> i know that the rest of my php code is working because I swapped the header line with a print command that displays the correct string in my flash movie.
Please let me know the best way to redirect the browser to a particular page once password authentication is verified!
thanks so much in advance!
The code that i used:
<?
$user="USER_NAME";
$host="MY_HOST";
$password="MY_PASSWORD";
$database = "MYDATA_BASE";
$connection = mysql_connect($host,$user,$password);
$db = mysql_select_db($database,$connection);
$db = mysql_select_db($database,$connection);
$pnts= ($amount*.02*1000*.6)+786;
$query = "SELECT * FROM passwords WHERE user='$puser' AND pass='$ppassword'";
$result= mysql_query($query);
$nrows=mysql_num_rows($result);
if ($nrows >= 1) {
header("Location: http://this_is_an_absolute_address.com/code/PROF_PROFILE_TEST.php");
exit;
}
else
{
Print "_root.status=SORRY! User and password does not exist on our database!";
}
?>