Alrite I got a script that on send needs executes: <form method="POST" action="<?php echo $PHP_SELF; ?>"> Code (markup): Now the original submission code was: <input type="submit" name="do" value="Send"> Code (markup): Now I want to use an image as my submit button so I used: <input type="image" src="http://i74.photobucket.com/albums/i245/msmug/send.jpg" border="0" name="do"> Code (markup): The problem is the when I hit submit using an image the code doesn't go through my php code to check for errors. However, using the button there is no problem, the button will scan for errors correctly. What am I doing wrong? Skinny
I've tried using the name="do" field. Isn't that the ID. It basically checks 'do' on the submit button. But it seems when using an image this variable isn't passed. Skinny
Try giving it a value. <input type="image" src="[...]" border="0" name="do" value="Send"> HTML: Or add a hidden field with the key and value...
Try making the type submit and making the scr/value the picture. Or put the following code [button]HTML For Image[/button] Little people know of the button tag. Maybe added a CSS to your submit button so that it comes up as a image, but make the type submit. I'm sure it's important for the value of the submit to be submit.
Reason : the raw output from the above form will be : Array ( [do_x] => 44 [do_y] => 47 ) PHP: so do this instead : <style type="text/css"> .submit { background-image:url(http://i74.photobucket.com/albums/i245/msmug/send.jpg); border:0px; width:97px; height:104px; } </style> <form action="" method="post"> <input type="hidden" name="do" value="Send"> <input type="button" class="submit" border="0" onclick="submit()"> </form> PHP: or similar
@ everyone. Thanks so much. I added a hidden value (do) and then just created the image button like before an it works like a charm. Thanks again Skinny