I have a simple little form & script password check experiment happening.
In the file that checks the username and password, I have an if ( ) checking the two values against comparison variables that were obtained through form posted values from another file and then depending on wether the username && password are correctly verified I want a header ( ) command to redirect the page accordingly.
I use the following code:
if ($user_id == $user_chk && $pass_id == $pass_chk)
{
header (“Location: logged_in.php”);
}
else
{
header (“Location: failed.php”);
}
and I keep getting an error saying something along the lines of:
Warning: Cannot add header information – headers already sent by (output started at
etc. etc. etc.
Could somebody please tell me what I need to do differently?