nmadd
Apr 24th, 2008, 11:19 AM
I have some very basic knowledge of PHP and that is it.
I'm curious about allowing multiple forms on one page based upon the query string. For example, this very site's profile.php page. Based upon the 'do' query string, a certain form is printed to the page. The user can then fill in the form and submit.
This is as simple as getting the query string value and then printing the necessary form to the page, correct? Then when the form is submitted back to the profile.php page there is a hidden input that shows which form it is? - i.e. on the profile.php editoptions page there is this:
<input type="hidden" name="do" value="updateoptions" />
1)Enough of my babbling, is this the correct logic for something like this?
2)If I am considering doing this with multiple forms that would execute a database query, is there any reason to do it like this or should I just make a separate page for each form?
Well, that was long winded. Thanks for any input or for telling me that I'm not making any sense.
I'm curious about allowing multiple forms on one page based upon the query string. For example, this very site's profile.php page. Based upon the 'do' query string, a certain form is printed to the page. The user can then fill in the form and submit.
This is as simple as getting the query string value and then printing the necessary form to the page, correct? Then when the form is submitted back to the profile.php page there is a hidden input that shows which form it is? - i.e. on the profile.php editoptions page there is this:
<input type="hidden" name="do" value="updateoptions" />
1)Enough of my babbling, is this the correct logic for something like this?
2)If I am considering doing this with multiple forms that would execute a database query, is there any reason to do it like this or should I just make a separate page for each form?
Well, that was long winded. Thanks for any input or for telling me that I'm not making any sense.