Form value retrieval
| From: | karthikeyan | Date: | Sun, 03 Mar 2002 14:44:22 +0000 |
| Subject: | Form value retrieval | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-86980@lists.php.net to get a copy of this message | ||
Hi Everybody,
In my somename.cgi file there are few hidden fields like this with the <form> tag:
<form action="somename.php" method="post">
<input type="text" name="somename" size="15"><br>
<input type="submit">
<input type="hidden" name="order" value="somevalue1">
<input type="hidden" name="order" value="somevalue2">
</form>
Now in my php file (somename.php) i somehow need to get that hidden name and value and
put it inside my php form like this :
<form action="somename.cgi" method="post">
<input type="radio" name="somename" value="somevalue">
<input type="submit">
<input type="hidden" name="order" value="somevalue1">
<input type="hidden" name="order" value="somevalue2">
</form>
Note : I cannot change the name of the hidden variable order into an array like order[1] or
something like that because that variable is being used by some cgi program so I want to maintain
the name as it is.
Note : I cannot change my form method=get and use QUERYSTRING
I have a cgi program which does job very easily like this :
foreach $line (@orders) {print "<input type=hidden name=\"order\"
value=\"$line\"> \n"}
how do i accomplish the same in php.
Looking forward for your response.
Regards,
karthikeyan.