Sign in to follow this  

[web] An Uber Simple Question!

This topic is 4352 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
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

This topic is 4352 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this