PHP session_start() problem?

davidfalsis

New member
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\xampp\htdocs\login.php:6) in C:\xampp\htdocs\login.php on line 7

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\login.php:6) in C:\xampp\htdocs\login.php on line 7

You're in!
-------------------------------------------------------------------------
The "Your in!" displays when you've logged in successfully but a problem occurs.

I already looked up in forums and found some solutions:
1.) remove the space after the <?php --- The error disappears but also the content of the page disappeared that displays "You're in!" if password and username matched.

2.) remove the php tag example: <? --- Same problem occured, no display of "You're in!".

3.) convert php into UTF-8 with no BOM --- I have no idea how to do that
I tried again solution #1 and it worked! Only problem is my else and echo statements displays also:

Click here to enter the member page."; } else echo "Incorrect password!"; } else die("That user doesn't exist!"); } else die("Please enter a username and password!"); ?>
 
Back
Top