Jump to content

Using Cookies or Sessions to store & Retrieve checkbox info


Pjack125

Recommended Posts

I am getting information from http://www.pixelfxmedia.com/lewiz.php the checkbox creates the array $Dept what I am trying to do is store that array so that i can navigate trough it and generate new pages from that array. using the following code

 

if(!isset($_GET['page'])) $page = 'Currentpage;
else $page = $_GET['page'];


$curPage = array_search($page,$Dept);
$next = $Dept[$curPage  +1];
$pref = $Dept[$curPage -1];

$blah = sizeof($Dept) -1; //counts the length of the array and substract it by two that way the last +1 wont give a null vall

if (0<$curPage){ 
echo "<a href=?page=".$pref."> << ".$pref."</a> |";
}
if ($curPage< $blah){ // Constrains the line below to the array length/size
echo "<a href=?page=".$next.">".$next.">></a>";
}

 

when user clicks on the next url I want it to reload the same page with with ?page=thenextpage

so for example if the next index in the array carried the value of EE it would end up going to page.php?page=EE

 

the issue arises when the page reloads. how would i go about storing that information so that i can reuse it?

 

 

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.