Jump to content

[SOLVED] $_GET submit image - stop posting mouse co-ords!


mattyvx

Recommended Posts

I have a small problem which i've eventually found out the cause for but im not sure how to resolve it.

 

Im using the below code which grabs a list of unique cities from my database and then places them into a drop down. When the drop down is submitted the url is set and directed to a table which uses the $GET variable "City" to display information for that city.

 

The problem is, because im using a image as a submit button its posting the mouse co-ordinates of the click along with the City variable so the output is something like

 

"./area/table.php?City=$city&.x=21&.y=74"

 

I only want the city variable to display but i want to keep my image submit button.... any ideas?

 

                <form action="../area/table.php" method="get">
                  <fieldset>
                    <h2><label for="town">Find Instructors in:</label></h2>
	<?php
                    include "scripts/citylist.php";
                    echo "<select name=\"City\" style=\"width:200px;height:25px;font-size:1em;\">";
                    while ($city = mysql_fetch_array($result)) 
                    {
                    echo "<option value=\"$city[0]\"> $city[0] </option>";
                    }
                    echo "</select>";
                    ?>
	<input  class="top10" type="image" src="images/searchnow.gif" />
                  </fieldset>
                </form>

 

p.s. we dont like using javascript  :P

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.