Re: Retrieving the multiple values set by a form
- From: anthony@xxxxxxxxxxxxxxxxxxx
- Date: 28 Sep 2006 00:45:55 -0700
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
.
- References:
- Retrieving the multiple values set by a form
- From: Girish
- Re: Retrieving the multiple values set by a form
- From: lorento
- Retrieving the multiple values set by a form
- Prev by Date: Re: Retrieving the multiple values set by a form
- Next by Date: Re: A little help please....
- Previous by thread: Re: Retrieving the multiple values set by a form
- Next by thread: Re: Retrieving the multiple values set by a form
- Index(es):
Relevant Pages
|