View Single Post
  #1 (permalink)  
Old June 21st, 2006, 12:30 AM
nidhimittal nidhimittal is offline
Authorized User
 
Join Date: Jun 2006
Location: bombay, maharashtra, India.
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default my session variables not retaining values

  hi all
i have been trying to use session variables but getting no results
my site is multipage and from first page i am storing value in session variable and retrieving it back in other pages but no variable retains its value in other pages
what i did was
if

register global=Off (directive in php.ini)

$page=$_GET["page"];

/*for all other pages*/
if($page > 1)
{
session_start();
 $emp_nos = $_SESSION['MyEmpNos'];

}
else
{/*in my first page*/

  session_start();
  $_SESSION['MyEmpNos'] = $emp_nos;

}

but i am not getting MyEmpNos value retained in further pages

i tried even with
 register global= On (directive in php.ini)
and
used

session_start();
session_register();

 also

but no results then too in variable $_SESSION["MyEmpNos"];
can somebody please help.................i need it urgently ..

nidhi
__________________
nidhi
Reply With Quote