maintaining session in directory traversal using php -


i'm new php ... i'm trying maintain session in directory traversal script ... every time go sub directory session variables lost ...
right script looks -

start_session();            //login , authenticate using functions in included scripts  //(include(login.php);include(auth.php)) , set session variables accordingly    if (session variable set) {     //start traversal script }   

so want know how can manage session in directory traversal ....can me out here ...

http://www.php.net/manual/en/function.session-start.php

session_start();  if (isset($_session['directory_path'])) {    $directory_path = $_session['directory_path']; } else {    $directory_path = 'default/path'; }  // traverse path  $_session['directory_path'] = $new_directory_path; 

Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -