This topic is locked

Default value $_SESSION["UserID"]

3/2/2020 8:53:34 AM
PHPRunner General questions
R
roeland author

Good afternoon,
Probibly a very simple question, but I can't find the answer in the forum.
I have a form where the userID should be added in one of the fields when adding a record. My id was that I could just write
$_SESSION["UserID"]
in the default value field. But unfortunately it does not work.
Can someone help me ?

woodey2002 3/2/2020

You need to declare a session variable in the after_successful_login event to capture the username after login.
Then you are free to use the said variable in your forms i.e. $_SESSION["UserID"]
https://xlinesoft.com/phprunner/docs/after_successful_login.htm
Cheers,

J

mbintex 3/2/2020

A Session variable is not needed - the Security API will do it too.
https://xlinesoft.com/phprunner/docs/secapi_about.htm