Hello:
I have created a page that checks a database to see if a user is registered or not. If the user is registered he is supposed to be forwarded to a page called success.html. The code I am using looks like this:
$result=mysql_query($sql);
// Mysql_num_row is counting table row
$count=mysql_num_rows($result);
// If result matched $myusername and $mypassword, table row must be 1 row
if($count==1){
// Register $myusername, $mypassword and redirect to file “success.html”
session_register(“myusername”);
session_register(“mypassword”);
echo “Success Launch”;
header (“Location: success.html”);
}
else {
echo “Wrong Username or Password”;
}
The if logic is working correctly as evidenced by seeing the echos. However, the script is not forwarding to success.html which is, of course, in the same directory. The page simply sits there showing me the success text that I am echoing. What am I missing?
Kevin