Page 1 of 1

php redirect problem

Posted: Tue Oct 11, 2005 9:38 am
by mhouldridge
Hi,

I have pages which redirect the user if their session variable == 0

I have noticed a problem when the user logs in with an invalid username or password, here is my code;

Code: Select all

} else {  
    header ("location: http://www.something.com/login.php"); 
	exit();
This else statement is excuted when the user / pass is incorrect.

I get the following error;

Warning: Cannot modify header information - headers already sent by (output started at C:\Audit\checkuser.php:11) in C:\Audit\checkuser.php on line 337

Any ideas?

Posted: Tue Oct 11, 2005 9:54 am
by mhouldridge
I think I understand this now...

I believe i was sending two sets of headers...

Posted: Tue Oct 11, 2005 10:20 am
by feyd