$_POST[$variable]
| From: | Christian Jancso | Date: | Thu, 11 Dec 2003 13:02:14 +0000 |
| Subject: | $_POST[$variable] | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-172463@lists.php.net to get a copy of this message | ||
Hi there,
I have the following problem:
How can I use variables in the $_POST statement?
Here is my code:
$old_station[$o] = $_POST['$i'];
$new_station[$o] = $_POST['$i'];
echo "<form name='station_change' method='post'
action='station_change.php'>";
echo "<TABLE BORDER=0>";
while ($status_array = mysql_fetch_array($status))
{
$i++;
echo "<tr>";
echo "<td>"."<FONT FACE='Helvetica' SIZE=-1>";
echo $status_array[1];
echo "</td>";
echo "<td>";
echo "<input type='text' size=2 name='$i'
value='$status_array[1]'>"."<input type='hidden'
name='$i'
value='$test'>"."<br>";
echo "</td>";
echo "</tr>";
}
echo "</table>";
echo "<input type='hidden' name='counter'
value='$i'>";
echo "<br>";
echo "<br>";
echo "<input type='submit' name='action'
value='Change'>";
echo "<input type='submit' name='action'
value='Delete'>";
echo "</form>";
can anyone help me?
thx for your help
Christian