php session lost when using paginate
Hi my PHP session is lost when using a pagination script. can someone explain why th开发者_如何学Gois would happen? I tried putting session_start() at the top off all the paginate script file but that did not work.
session_start();
$_SESSION['user'] = $line['UserName'];
$_SESSION['pass'] = $line['Password'];
$_SESSION['session_key'] = $time_started.$secure_session_user.session_id();
$_SESSION['current_session'] = $line['UserName']."=".$_SESSION['session_key'];
If you are not able, or don't want to show us the code for your pagination, then I can only think of 2 reasons as to why it ain't workin':
- You've done something wrong somewhere, and don't know it yet. Or;
- The pagination code you have is using session info for its own stuff (like mine), and maybe it is resetting session info without you knowing it.
All I can do is suggest that you check over your code, make sure you don't have any errors in the way you're handling your sessions, and also check your pagination script.
I hope this helps, though I doubt it will.
精彩评论