The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Erich, when you use an image type input it does not send the input name attribute alone but it does the send the coordinates of where the button was clicked as
$imageinputname_x and $imageinputname_y
So checking for the existence of the variables will allow you to know whther or not the form was submitted by clicking on the image input

Please don't PM me with questions.
Use the forums, that is what they are here for.

Thanks,
But I don't understand... I thought you can use images to submit forms. But when I click the image it sends me back to the same page! I need a way to change the action of the button. Could I put each button in its own form?

oh BTW, my real name isn't Erich My name is Stephan. I am real big history buff so I put Erich Hartmann as my nickname

Erich, yes the image input acts as a submit button, so it will take you to where the form action points, you may want to include each one in a separate form, but remember that each form will only submit fields that live within each form.

Please don't PM me with questions.
Use the forums, that is what they are here for.

okay this is realy untested and my network just went down so I can't test it but here goes you have a javascript that is called when one of the images is clicked, the image is a link with a js call in it which passes a new page to the script, the script changes the action of the form and the submits it. Please let me know if this works or not.

Originally posted by freddydoesphp okay this is realy untested and my network just went down so I can't test it but here goes you have a javascript that is called when one of the images is clicked, the image is a link with a js call in it which passes a new page to the script, the script changes the action of the form and the submits it. Please let me know if this works or not.

Yeah but I thought Erich wanted to have a giant form with a bunch of different fields in it, then have six different images in it and all of them are submit buttons but each one needs the form to post somewhere different. Just answering the questions for what they are.

Please don't PM me with questions.
Use the forums, that is what they are here for.

Yea, I know. I am saying you could acheive the same thing by checking which image the clicked and then doing that form action depending on which one they clicked. it would be better than javscript...do you undetstand what i mean?

Not really if the form already gets submitted, unless all the processing regardless of whcih image was clicked happens on the same page, you would need to pass all that data on to another page somehow. Don't you think it would be easiest to do it before the submit the form?

Please don't PM me with questions.
Use the forums, that is what they are here for.