otuatail Posted June 12, 2008 Share Posted June 12, 2008 Never used an image as a submit button I need to use an image but as a submit so that I can access the data on the next page. Is this near right? <input type="button" name="submit" src="images/Update_Drinks.gif" alt="Update_Drinks"> The image and path are correct. Link to comment Share on other sites More sharing options...
xtopolis Posted June 12, 2008 Share Posted June 12, 2008 http://www.ampsoft.net/webdesign-l/image-button.html Go here to see the CSS you need. <form action="http://www.google.com/search" method="get"> <input type="Text" name="q" size="45"> <button id="replacement-1" type="submit">Search with Google</button> <!-- <div><button style="display:block" id="replacement-1" type="submit">Search with Google</button></div> --> </form> <h4>Using padding-top for image replacement:</h4> <form action="http://www.google.com/search" method="get"> <input type="Text" name="q" size="45"> <button id="replacement-2" type="submit">Search with Google</button> </form> Link to comment Share on other sites More sharing options...
AndyB Posted June 14, 2008 Share Posted June 14, 2008 Since you have already been given the solution in another near-identical thread, I'll close this one. For reference purposes, compliant browsers return the x y coordinates of WHERE the submit image was clicked, relative to the upper left corner. For a form method POST, and a submit button named banana, $_POST['banana_x'] and $_POST['banana_y'] will contain those values. $_POST['banana'] will have no value. Link to comment Share on other sites More sharing options...
Recommended Posts