What I want it to do is to record the string that I sent to search, and when someone goes to the search page again, it displays their last entered search.
I have got the script creating a cookie fine, but I am having troubles reading it back.
I am using:
Code: Select all
<?
$search = $_POSTї"searchEntry"];
setcookie("previousSearch", $search, time()+36000, "/30055351/");
?>Then in the html page, with the form I have
Code: Select all
<?
if (isset ($previousSearch)) {
echo "<p>" . $previousSearch . ": Your last search</p>";
}
else {
echo "<p>Welcome to this page for the first time.</p>";
}
?>I am using IE6, with Xitami (Windows, here) and Apache(Solaris, remote server).
Thanks for any help