Page 1 of 1

Form Variables.. a question for experienced coders

Posted: Sun Nov 23, 2003 8:48 pm
by romeo
I have heard of programs that read an html form

<form action=order.php>
<input type hidden name=stuff= value=Svalues>
</form>

And display it in the order it was written and pathed to the processor... like a direct link

this for have an output of

order.php?stuff=Svalues


Anyone have a clue what this program or terminolgy is>?

Posted: Sun Nov 23, 2003 9:01 pm
by d3ad1ysp0rk

Code: Select all

<form action="order" name="orderform" method="get">
<input type="hidden" name="stuff" value="svalues">
<input type="text" name="amount">
<input type="submit" name="submitbutton" value="Send">
</form>
will send you to order.php?stuff=svalues&amount=what you entered


but what do you want this for?

Posted: Sun Nov 23, 2003 9:03 pm
by McGruff
Not entirely sure what you're question is.

You can of course view source in a browser to see hidden vars. If you were to pass these to the processor as you have described, you'd be passing them as $_GET vars - but normally form processors expect the form to use the "post" action (not always, although they should) so they will be looking for $_POST vars.

Of course with register globals on (which ideally it shouldn't be) the processor may not attempt to access either of the $_GET or $_POST superglobal arrays and so won't distinguish between vars passed via either method.