Jump to content

session_start() function


Kevin M

Recommended Posts

Quick Session Question.Say on a page, I have this code:

if (!isset($_SESSION['user'])) {header('location: index.php');exit;}

Will I need to have the session_start() function at the top of the page, even if I'm not echo'ing out or creating/modifying any session data? Or is the session_start() function needed on every page where you use sessions at all?Thanks,Kevin

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...