how to execute a submit command if the submit button is a custom gif button not the usual submit button
submit with a graphic button
<input type="image" name="submit" src="file.gif">
thats it really. what php is usually looking for is the name of the submit button.
so you just say
if (isset($submit)) {
do this
}
I suddenly feel as if I have another personality or three. The question is, which of us is the evil one?
Well, Ben? Which is it?
-Ye Olde Ben
This is good question. I have had a problem when using images instead of the button. I have forms that when I have the button, it works, but when I change it to an image none of the form data gets passed.
Why does that happen,and is there a way to get it to work when using an image instead of a button.
Hi,
when i use graphics buttons i usually let the form be processed by another file. so in the form itself i put:
echo "<a href=edit_note.php?id=$id><img src=\"\graphics\edit_note.gif\" width=\"100\" height=\"20\" border=\"0\"></a>";
hope that helps
witold
Yeah that would work just as well.
But is there something about PHP that prevents the image type submit button from working?