Another session problem!
I have a session variable from the SecurityAssist created login pages called SecurityAssist_UserID, and this is being populated fine... I can use this session variable in many places.
I have come to use this on a totally different page to others where I have used it, and I am currently trying to use it in a recordset, but the recordset isn't working as I expected! This is the recordset:
$colname_rs_users = "-1";
if (isset($_SESSION['SecurityAssist_UserID'])) {
$colname_rs_users = $_SESSION['SecurityAssist_UserID'];
}
mysql_select_db($database_conn_mrs, $conn_mrs);
$query_rs_users = sprintf("SELECT * FROM tbl_users WHERE UserID = %s", GetSQLValueString($colname_rs_users, "int"));
$rs_users = mysql_query($query_rs_users, $conn_mrs) or die(mysql_error());
$row_rs_users = mysql_fetch_assoc($rs_users);
$totalRows_rs_users = mysql_num_rows($rs_users);
As you can see, I am trying to pull through the users info based on the session set when he logged in, but it's not working. I am trying to display the content of the users account on a page, by dropping the bindings onto the page from the recordset, but I am just getting blank regions. The binding of the session variable is displaying fine though!
Again... what am I doing wrong?
Thanks.