pwes24 Posted February 25, 2008 Share Posted February 25, 2008 I'm using a custom made submit button using the image field like this: <input name="submit" type="image" value="submit" src="images/submit_bt.png" alt="submit message" /> but somehow it does not send information. What should I do? Link to comment https://forums.phpfreaks.com/topic/92971-submitting-form-with-the-image-field-input/ Share on other sites More sharing options...
AndyB Posted February 25, 2008 Share Posted February 25, 2008 <input type="submit" name="submit" src="..../> Test to see if the form has been submitted by checking is $_POST['submit_x'] has a value. Image submits send the x and y co-ords of the point clicked relative to the top left of the image. If that doesn't help, show us some form code. Link to comment https://forums.phpfreaks.com/topic/92971-submitting-form-with-the-image-field-input/#findComment-476321 Share on other sites More sharing options...
DarkerAngel Posted February 25, 2008 Share Posted February 25, 2008 hum... this seems more appropriate in the HTML section but, try: <input name="submit" type="image" value="submit" src="images/submit_bt.png" alt="submit message" onClick="document.[FORM_NAME].submit();" /> replace [FORM_NAME] with the name of your form in <form name="[FORM_NAME]" Link to comment https://forums.phpfreaks.com/topic/92971-submitting-form-with-the-image-field-input/#findComment-476322 Share on other sites More sharing options...
pwes24 Posted March 31, 2008 Author Share Posted March 31, 2008 I've done some research and it looks like AndyB is right. All I did to make it work is: if (isset($_post['submit_x'])). The onclick function doesnt seem to do anything. I ommitted it and the code still works fine. Thank you people! Link to comment https://forums.phpfreaks.com/topic/92971-submitting-form-with-the-image-field-input/#findComment-505401 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.