I have a question about the browser back button not working after my script runs. I have a page with several different search functions. Without printing out a bunch of code, here is the situation. First off, the search portion of the script is working fine. After user gets results of a search, if the browser back button is used to go back to do another search, nothing happens unless you refresh the page after using the back button. If you use a link I have provided, the page goes back fine.
Here is sort of a run down how the flow of the script is wriiten:
<?
session_start();
header("Cache-control: private");
$title = "Search Complaints";
require ('a_includes/top_of_page.inc');
if (empty($searchterm))
{
// display search form html from an include file
exit();
}
elseif ($searchterm == "1" )
{
// code for searching a database goes here
// require a file with html for displaying search results goes here
session_unset();
session_destroy();
?>
echo "<p align=\"center\"><a class=\"b\" href=\"search_complaints.php\">Perform Another Search?</a></p>";
<?
}
require ('a_includes/bottom_of_page.inc');
?>
after search results are displayed, I have a link back to the search page. If you use the link, script takes you back to the search form but if you use the browser back button, nothing happens.
Any clues as to why? Can this be fixed?