Page 1 of 1

session_start()

Posted: Fri May 09, 2003 3:42 am
by Gerard_P
Is it necessary to write session_start( ) in all the files that need session?

Thanks in advance.

Posted: Fri May 09, 2003 4:14 am
by []InTeR[]
Most scripts are build with 1 page.

That includes ohter pages....

Code: Select all

<?
  session_start();

  $act = (isset($_GET["act"])) ? $_GET["act"]: "index";

  if(file_exists($act.".inc.php")){
    include($act.".inc.php");
  }
?>

Posted: Fri May 09, 2003 4:23 am
by Gerard_P
Thanks for the tip.