Posted by anthony on 12/16/55 11:59
I have to wonder why you're using GET at all for form submission. If
you used post, you could just pass in an array:
<form method="POST" action="somesecript.php">
<input type="text" name="values[]"/>
<input type="text" name="values[]"/>
</form>
And in the processing:
foreach ($_POST["values"]):
// do something with each value
endforeach;
~A!
lorento wrote:
> Girish wrote:
> >
> > http://xxxx/get_variables.php?form_variable=value1&form_variable=value2&form_variable=variable
>
> Above request will be read by php like this:
> $_REQUEST["form_variable"] = "value1";
> $_REQUEST["form_variable"] = "value2";
> $_REQUEST["form_variable"] = "value3";
>
> so only the last value will be the result. Because the first will be
> replaced with second value and second value will be replace with the
> last value. I think its better you use different variable name.
>
> http://xxxx/get_variables.php?form_variable1=value1&form_variable2=value2&form_variable3=variable
> You can get all the values of above variables.
>
> ---
> http://www.theukmap.com
> http://www.theaussiemap.com
Navigation:
[Reply to this message]
|