| Posted by Paul on 04/05/07 17:28 
I am taking over an exisitng app.  I have the following function on one page:
 
 function check($v) {
 global $user;
 return $user->validate($v[1], $v[0]);
 }
 
 And it reference $user on the next page.  Register_globals are set on the
 existing server but I am moving to a new server where it is not.  The code
 of the next page is lilke:
 
 session_register('user');
 $user=$_SESSION['user'];
 
 I also want to turn it around so it's:
 $_SESSION['user'] = $user;
 
 But that fails - $user is empty.  By the way, $user is an object.
 
 Any ideas to how to make sure:
 $_SESSION['user'] = $user;
 
 works on the second page?
  Navigation: [Reply to this message] |