I have a page with a search form on it and a table with the search results below. In the search form, I have the checkbox "Search in this category". What I do to check it by default:
if(!isset($_SESSION['inthiscat'])){
$_SESSION['inthiscat'] = 'on' ;
$checked = 'checked';
}
$_GET['inthiscat'] = $_SESSION['inthiscat'];
cell code: INPUT type = "checkbox" name = "inthiscat" <?=$checked?>. Link to next page of index.php results? Inthiscat = $ _ GET ['inthiscat']. So the problem is that I will uncheck the box next to “Search this category,” which is still checked when I go to the next page of results. How to fix it and what am I doing wrong? Of course, the entry level session.
source
share