Jump to content

Paged data retrieval is breaking my Session.


Mavent

Recommended Posts

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?

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.