scmeeker Posted July 9, 2010 Share Posted July 9, 2010 Is it possible to have an image in place of the generic submit button on a PHP form? I know how to incorporate PHP into an image to make a link but I wasn't sure about a form submit. If so, how would I incorporate this image into this line of code? <input type="submit" name="submit" value="NEXT" /> Here is the image code: <img src=\"add_new_button.gif\" width=\"180\" height=\"43\" border=\"0\" /> Thank you. Link to comment https://forums.phpfreaks.com/topic/207203-using-an-image-button-for-form-submit/ Share on other sites More sharing options...
AbraCadaver Posted July 9, 2010 Share Posted July 9, 2010 echo "<input type=\"image\" src=\"add_new_button.gif\" width=\"180\" height=\"43\" border=\"0\" alt=\"Submit\" name=\"submit\" value=\"NEXT\"/>"; But I think the value will be x and y coordinates of where you clicked the image. Link to comment https://forums.phpfreaks.com/topic/207203-using-an-image-button-for-form-submit/#findComment-1083353 Share on other sites More sharing options...
AbraCadaver Posted July 9, 2010 Share Posted July 9, 2010 echo "<input type=\"image\" src=\"add_new_button.gif\" width=\"180\" height=\"43\" border=\"0\" alt=\"Submit\" name=\"submit\" value=\"NEXT\"/>"; But I think the value will be x and y coordinates of where you clicked the image. Value will be an array: submit_x=coordinate, submit_y=coordinate, submit=NEXT Link to comment https://forums.phpfreaks.com/topic/207203-using-an-image-button-for-form-submit/#findComment-1083358 Share on other sites More sharing options...
scmeeker Posted July 9, 2010 Author Share Posted July 9, 2010 When I tried that, it came up with an input box with the "next" in it. Hmmmm...I've been playing around with it but still no luck. Link to comment https://forums.phpfreaks.com/topic/207203-using-an-image-button-for-form-submit/#findComment-1083359 Share on other sites More sharing options...
scmeeker Posted July 9, 2010 Author Share Posted July 9, 2010 I found it: <INPUT TYPE="image" SRC="images/submit.gif" BORDER="0"> Thanks! Link to comment https://forums.phpfreaks.com/topic/207203-using-an-image-button-for-form-submit/#findComment-1083361 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.