Hi,
i’m trying to retrieve data from a form with this code:
[CODE]<?php
for ($i=1; $i<=7; $i++)
{
$dat.$i = $_POST[“dat”.$i];
echo $dat.$i;
}
?>
but it doesn’t work, if i skip the variable doing so:
[CODE]<?php
for ($i=1; $i<=7; $i++)
{
echo = $_POST[“dat”.$i];
}
?>
i get correctly all the results, but putting them in a variable the result is just the first value (dat1)
For any doubt, this is the form code:
[CODE]<form action=”date_insert_check.php” method=”post” >
<?
for ($i=1; $i<=7; $i++)
{
?>
<? echo $i ?>: <input name=”dat<? echo $i ?>” type=”radio” value=”2010-04-<? echo $i ?>”>
<?
}
?>
<input type=”submit” name=”Submit” value=”Submit”>
</form>
Thanks a lot for any suggestion.