0

hello,

i've been working on this website for a while (www.scfan.net), but for some reason the page: /gameinfo.php has an error with the session code. i'm using this code on every other page on the website too. but only /gameinfo.php and /livestream.php and /tac_protoss.php have the problem.

could anyone help me out here? because i'm at a loss.

here is the codee i use to validate people trying to log in:

if (!isset($_SESSION)) {
  session_start() ;
}
3
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by broj1
0

You need to start the session before any other output is sent to the browser, because it sends a PHPSESSID cookie in the response headers.

0

Just do the session_start() on the very beginning of the script and without the if statement.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.