Posted By

sb_01 on 10/02/10


Tagged

php session start secure


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

bobbym245
robaj
koyotebr
ringo380


Start a secure session


 / Published in: PHP
 

  1. function startSession() {
  2. session_name($this->session_name);
  3. $ok = @session_start();
  4. if(!$ok){
  5. session_regenerate_id(true); // replace the Session ID
  6. session_start(); // restart the session (since previous start failed)
  7. }
  8. }

Report this snippet  

You need to login to post a comment.