• Advertisement
Sign in to follow this  

[web] An Uber Simple Question!

This topic is 4424 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I would like to know, when using PHP, is it possible, on submission of an html form, to access other forms inputs not just the posting one? I know that you use $_POST[ blah ] to access the elements of the submitting form, but what about the data in the non submitting forms of the page? Dave

Share this post


Link to post
Share on other sites
Advertisement
I don't think you can. Only the data in the submitted form is sent by the browser.

Share this post


Link to post
Share on other sites
well the data in the non submital area is most likely static. just send it back in the post as extra data in relation to the page content?

Share this post


Link to post
Share on other sites
All the data you want to submit must come from the client -- that means you have to figure out how to make the client send it.

One way is to have some input type hidden fields in your submittal form, and populate them with whatever data you're interested in, using javascript, before you actually submit the form.

Another way is to make the entire web page one single form, so that all fields on the form go to the submittal. On the server, you can then tell which submit button was pressed by looking at the value of the submit button field.

Share this post


Link to post
Share on other sites
I might be missing something here, but if I have a form setup and press the submit button for that form, all the form elements get sent to the server, where your script just pulls out what you need.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement