Displaying error message after redirecting the user
Posted: Sat Mar 28, 2009 4:40 pm
Hello everyone....i've been battling with this problem for a while now....I created a login script....everything works well except when i want to display error messages to users after they login with wrong values
when i try to do something like this :
if(mysql_num_rows($query) = 0) {
header("Location : login.php?muta=0&ml=".$_POST['username']);
echo "Invalid login detail";
exit();
}
the above code does display muta=0&ml=..'the username' on the URL but does'nt display the error message, but when i removed the line header ("Location : login.php?muta=0&ml=".$_POST['username']); it displayed the error message.
I need help on this as soon as possible.
when i try to do something like this :
if(mysql_num_rows($query) = 0) {
header("Location : login.php?muta=0&ml=".$_POST['username']);
echo "Invalid login detail";
exit();
}
the above code does display muta=0&ml=..'the username' on the URL but does'nt display the error message, but when i removed the line header ("Location : login.php?muta=0&ml=".$_POST['username']); it displayed the error message.
I need help on this as soon as possible.