Post Variables
| From: | Brad Bonkoski | Date: | Wed, 04 Dec 2002 22:48:19 +0000 |
| Subject: | Post Variables | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-127045@lists.php.net to get a copy of this message | ||
Hello,
I am trying to make a script that looks something like:
for ($i=0; $i<=12; $i++)
{
echo "<select name='$i'>";
echo "<option values....>";
}
Then I am posting those to another page, and trying to get the data out
for ($i=0; $i<=12; $i++)
{
echo $_POST['$i'];
}
And it doesn't work. Any thoughts on if something like this is doable?
obviously in raw HTML it looks like:
<select name=1><option value=??>??</option>
because I can do: echo $_POST['1']
and get the correct value, but I would like it to get the value of $i?
Thoughts?
Thanks
-Brad