Forums
This topic is locked
Session Help with PHP and mySQL
Posted 14 Apr 2004 20:51:49
1
has voted
14 Apr 2004 20:51:49 Jeff Montgomery posted:
I am trying to create a session after a user logs in to my site. I tried this: <?PHP $_SESSION['custnum'] = $row_rsUser['CustNum']
?>
The recordset is filtered by the default session MM_Username.
on the next page I try to show the session by <?php echo $_SESSION['CustNum']; ?>
but it is blank.
What am I doing wrong. THanks
Replies
Replied 15 Apr 2004 03:03:08
15 Apr 2004 03:03:08 Phil Shevlin replied:
There's not enough info in your post to tell whats wrong. $row_rsUser['CustNum'] could be empty or MM_Username could be empty.
Can you echo $row_rsUser['CustNum'] on the page where the session is defined?
Can you echo MM_Username on the page where the session is defined?
Can you echo $row_rsUser['CustNum'] on the page where the session is defined?
Can you echo MM_Username on the page where the session is defined?
Replied 26 Apr 2004 03:41:27
26 Apr 2004 03:41:27 Jeff Montgomery replied:
Nope, I echo'ed it and nothing came up. Wierd
Replied 26 Apr 2004 13:42:03
26 Apr 2004 13:42:03 Phil Shevlin replied:
Then you recordset is not working. Try replacing mm_username with hard-coded strings. If that works, then check into you login system.
Edited by - wdglide on 26 Apr 2004 13:44:25
Edited by - wdglide on 26 Apr 2004 13:44:25