NYCPHP Meetup

[nycphp-talk] Problems writing session variables

Ian Forsyth ian at plusfour.org
Thu Apr 3 13:32:20 EST 2003


Hi,

See notes below.

On Thursday, April 3, 2003, at 10:11 AM, Daniel Porcher wrote:
>
> function loginuser()
> {
>
>    global $_POST;
>    global $_SESSION;
>
//Add these things to debug, make sure you have data.. and see what 
data you have..
print_r($_POST) . " POST <br>\
";
>    $userid = $_POST['userid'];
>    $passwd = $_POST['passwd'];
>

print_r($_SESSION) . " SESSION <br>\
";
>    //I validate user against DB here, if valid I write out session 
> variables

// i am not sure if this is correct.. print_r the vaules of each field, 
or if you can, get the whole row.. and print_r that row..
print_r($rsSecurity) . " ODBC CONNECTION SOMETHING OR OTHER <br>\
";
>
>    $_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');
>
print_r($_SESSION) . " SESSION AFTER DB <br>\
";
> }

Does the correct info print out? What is there?

Ian




More information about the talk mailing list