Mavent Posted February 10, 2012 Share Posted February 10, 2012 Here's the site: http://www.secretauctions.com/thank_atv_cb754.php# (If anyone wants to see how the problem is occurring. The Username and Password shown on the page are functional.) Here's the problem: Whenever anyone tries to click to the second page of results, the Session fails. Here's a short version of the code: <?php $username = "user493d"; $password = "w7atv"; session_start(); $my_array=array($username, $password); $_SESSION['login']=$my_array; if ($_SESSION['login'][0]=="user493d" && $_SESSION['login'][1]=="w7atv") include("atv_list.php"); else include("sorry1.php"); ?> This works GREAT on the initial log-in. But the moment anyone tries to go to the second page of results, the Error state trips, and they get the "sorry" page. This isn't supposed to happen. This is my first foray into Sessions, so I'm certain there's something I'm not understanding, but shouldn't the above code store the username/password, then use it to verify page reloads? Can anyone tell me why it's allowing the Fail state to trip, when the initial test succeeds? Or am I doing the whole thing wrong? Quote Link to comment https://forums.phpfreaks.com/topic/256833-paged-data-retrieval-is-breaking-my-session/ Share on other sites More sharing options...
Drummin Posted February 10, 2012 Share Posted February 10, 2012 But the moment anyone tries to go to the second page of results, the Error state trips, and they get the "sorry" page. Seemed to work fine for me. Toggled pages no prob. Quote Link to comment https://forums.phpfreaks.com/topic/256833-paged-data-retrieval-is-breaking-my-session/#findComment-1316706 Share on other sites More sharing options...
jcbones Posted February 10, 2012 Share Posted February 10, 2012 Works fine for me as well. Quote Link to comment https://forums.phpfreaks.com/topic/256833-paged-data-retrieval-is-breaking-my-session/#findComment-1316818 Share on other sites More sharing options...
bspace Posted February 11, 2012 Share Posted February 11, 2012 infact going straight to http://www.secretauctions.com/atv_list.php works without going through the login ie - logged in using firefox, copied and pasted above url into chrome - no errors, no login required Quote Link to comment https://forums.phpfreaks.com/topic/256833-paged-data-retrieval-is-breaking-my-session/#findComment-1316879 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.