This topic is locked

Insert Login Name

12/27/2009 20:13:46
PHPRunner General questions
C
capp author

Hi All,
Code is pasted below, the "UserName" is the field from the User's table

but it doesn't show up. How do I call the user's login name and populate into the updates table?

//********** Insert a record into another table ************

global $conn;

$strSQLInsert = "insert into ALL_UPDATES (UPDATE_TIME, USER_LOGIN)

values (now(), UserName)";

db_exec($strSQLInsert,$conn);
L
lewisekrantz 12/27/2009



Hi All,
Code is pasted below, the "UserName" is the field from the User's table

but it doesn't show up. How do I call the user's login name and populate into the updates table?

//********** Insert a record into another table ************

global $conn;

$strSQLInsert = "insert into ALL_UPDATES (UPDATE_TIME, USER_LOGIN)

values (now(), UserName)";

db_exec($strSQLInsert,$conn);



The user id is one of the Session Variables $_SESSION["UserID"]