This topic is locked
[SOLVED]

 default assignment

1/5/2010 1:25:37 PM
PHPRunner General questions
T
titanic author

If we want to assign Logged_in user_ID to "ID" fieids by default, what should we do?

phray 1/5/2010



If we want to assign Logged_in user_ID to "ID" fieids by default, what should we do?



i think in the editor you can set the default for that field to:

$_SESSION["UserID"]
T
titanic author 1/5/2010

i cannot write it into ID field..

J
Jane 1/7/2010

Hi,
$_SESSION["UserID"] contains username of current user.

You can save user ID in the new session variable in the After Successful Login event:

$_SESSION["user_ID"] = $data["Fieldname"];


Then use $_SESSION["user_ID"] as default value.