I have a search form that goes to search.php
?page=1 (has pagination). At the top of search.php I have:
PHP Code:
<?
session_start();
$_SESSION['keyword'] = $_POST["keyword"];
?>
Further in my code I explode $_SESSION['keyword'] (to alter the terms for boolean search), implode the terms and pass them off to my MySQL query. This all works, it returns the first page of results. Yet when I click the next page (search.php?page=2) it returns nothing, the session variable no longer exists.
Any ideas as to why this is happening? I'm not super great with sessions, but something simple like this should work.