NYCPHP Meetup

NYPHP.org

Problems writing session variables

Daniel Porcher danporcher at earthlink.net
Thu Apr 3 13:14:51 EST 2003


Can anyone tell me why I can't successfully write out session variables.

I'm test in a Windows AMP environment. I doublechecked the session folder in
php.ini and I'm successfully creating and deleting the sessions themselves.
When I look at the variables in the session file after I execute the code
below, all I see is:

!ses_user|


The code:

<?php

session_start();

loginuser();

function loginuser()
{

   global $_POST;
   global $_SESSION;

   $userid = $_POST['userid'];
   $passwd = $_POST['passwd'];

   //I validate user against DB here, if valid I write out session variables

   $_SESSION['ses_user'] = $userid;
   $_SESSION['ses_access'] = odbc_result($rsSecurity,'AccessType');
   $_SESSION['ses_orgtype'] = odbc_result($rsSecurity,'OrgType');
   $_SESSION['ses_orgid'] = odbc_result($rsSecurity,'OrgID');

}


Thanks,

Dan


Daniel Porcher
President
Watershed Web Design

Website: http://www.watersheddesign.com
E-mail: dporcher at watersheddesign.com
Phone: 609-466-0266

"A ship in harbor is safe, but that is not what ships are built for."





More information about the talk mailing list