Hi,
I've been arround looking for what has been posted and nothing seemed to help me.
Here's the problem...
In my search page "search.php" (where the form is) I have set the session:
PHP:--------------------------------------------------------------------------------
session_name("mysession");
session_start();
if(session_is_registered("mysession")){
session_destroy("copy_postvars" );
}
After clicking on submit the user is sent to page "search_details.php" where I have the following code for the session:
PHP:--------------------------------------------------------------------------------
session_name("mysession");
session_start();
if(!session_is_registered("mysession_search")){
$mysession_search = "last_search";
session_register( "mysession_search" );
$copy_postvars=$HTTP_POST_VARS;
session_register( "copy_postvars" );
} else {
if(!isset($copy_postvars)) $copy_postvars=$HTTP_POST_VARS;
}
foreach($copy_postvars as $key => $value){
$$key=$value;
}
if($back=='yes'){
if($mysession_lastSearch=="detailed"){
foreach($copy_getvars as $key => $value) $$key=$value;
} else {
$mysession_lastSearch="detailed";
session_register("mysession_lastSearch");
$start_row=0;
$end_row=10;
$copy_getvars["start_row"]=0;
$copy_getvars["end_row"]=10;
session_register("copy_getvars");
exit;
}
} else {
$mysession_lastSearch="detailed";
session_register("mysession_lastSearch");
$copy_getvars=$HTTP_GET_VARS;
session_register("copy_getvars");
}
On this page the user may go to the detail page of each result found on the page "codingtips.php".
Here I only have:
PHP:--------------------------------------------------------------------------------
session_start();
I have in this page a link to get BACK to the "search_details.php" page (where the user came from) but when I click there, I do get back to the page but no more with the same results.
Another strange things that is happening, is that when the user clicks the "order by" buttons on the search results page, instead of ordering only on the found results, the query will order on all items on the database. Hummm.. 🙁
Any help would be apreciated.
Thanks in advance !