button help

Posted on 16th Feb 2014 by admin

i originally had this but realised it is much easier to have a button.

Code: <?php
$search = $_GET['search'];
$checkbox = $_GET['checkbox'];
if($checkbox == 'on')
{
include("searchtopic.php?search=$search");

}
else
{
include("searchnormal.php?search=$search");
}


?>

how do i make a button that anytime it is clicked it refreshes the page and includes the opposite of whatever searchtype it was previously on (searchnormal.php or searchtopic.php)?

Other forums