I am trying to pass a variable to a php form but it is not passing through. The lines are the following:
then i am trying to retrive it like this:
or this
is it not possible to do this?
Code:
echo "<form action='create_table_test2.php', method='post'>";
while($NumCols > 0)
{
echo "<input type='text' name='Col$ColNum' />
$ColNum++;
$NumCols--;
echo "<br>";
}
echo $NumCols2;
echo "<input type='hidden' name='Cols' value=$NumCols2 />";
echo "<br>";
echo "<input type='submit' name='Change' value='Change Table' />";
echo "</form>";
then i am trying to retrive it like this:
Code:
print $_POST["$Col$ColNum"];
Code:
print $_POST['Col$ColNum'];