Forum Moderators: coopster
<form action="searchpage.php" method="get">
<input type="text" name="search">
<input type="submit" value="Go">
</form>
In my URL from this page, I have: http://www.example.com/searchpage.php?search=foo+search&x=0&y=0
The X & Y variable I can't trace where they're coming from. I've looked on every file I can't find any reference to anything being named. Can you they come from OUTSIDE of an INPUT tag and if so where? What's more maddening is that when I go to different places in my site, and search (the search feature is available from every page), those two variables change. It's driving me nuts. I'm concerned mostly about search engines dinging me for dupe content.
[edited by: eelixduppy at 7:07 pm (utc) on Nov. 20, 2007]
[edit reason] switched to example.com [/edit]
Looks like you are stuck with them unless you use a regular button.
[webmasterworld.com...]
[edit]
actually...
if you put this at the top of your "searchpage.php" file you should suppress the coordinates.
<?php
if(isset($_GET['x'])) header("location:searchpage.php?search={$_GET['search']}");
?>
<script>
function submitForm(formName){
document.forms[formName].submit;
}
</script>
<form method='GET' action='searchpage.php' name='search>
<input type='text' name='q' value='search..' onClick="this.value=''" /><br />
</form>
<a href='javascript:;' onClick='submitForm("search");'><img src='yourimage.jpg' /></a>
untested but something like that should work and avoid your x & y's
[edit] this would not be degradable so if they had JS off you wouldnt be able to submit your form. so have a <noscript> tag to take them to a normal form..[/edit]
Enjoy
Alan
[edited by: Kings_on_steeds at 1:33 pm (utc) on Nov. 21, 2007]