Forums

This topic is locked

PHP login - PHP extra session variable required

Posted 15 Nov 2007 19:23:37
1
has voted
15 Nov 2007 19:23:37 J Ross posted:
Hi
I am trying to take accross the userid when logging in but so far unlucky
Here is my attempt

$LoginRS__query=sprintf("SELECT userName, userPassword, userAccess , <b>userID </b> FROM users WHERE userName=%s AND userPassword=%s",
GetSQLValueString($loginUsername, "text", GetSQLValueString($password, "text");

Then I need to add my variable
This is where it should go but I don't know how to assign it
$_SESSION['MM_UserID'] = WHAT????
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;

Any help would really be appreciated
Thanks

Reply to this topic