Jump to content

using an image button for form submit


scmeeker

Recommended Posts

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

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.

 

 

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

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.