I have the following code:
<?php
function search_reset()
{
$query = $_GET['q'];
if($query)
echo '<a class="reset" title="Clear search query" href="http://localhost:8888/search/">Clear search query</a>';
}
function search_query()
{
$query = $_GET['q'];
echo $query;
}
?>
<form method="get" action="">
<fieldset>
<input type="text" name="q" id="q" value="<?php search_query(); ?>" placeholder="Search" />
<?php search_reset(); ?>
<span class="submit">
<input type="submit" name="submit" id="submit" value="Search" title="Search" />
</span>
</fieldset>
</form>
The idea is that when a user does a search it will do the normal query string e.g. domain.com/?q=searchquery but instead it adds a second query string from the submit button like so: /?q=hello&submit=Search how do I stop this? I don't remember ever having this problem before :/
Thanks