I have this page:
<?php
for($i=1; $i<=3; $i++){
$until_he.$i = htmlentities($_POST['until'.$i])
}
?>
<form action="" method...>
<?php
for($i=1; $i<=3; $i++){
...
print '<input name="until'.$i.'" id="until'.$i.'" class="textinput" value="'.$until_he.$i.'" type="date" min="'.date("Y-m-d").'"/>';
...
}
?>
...
Now:
$until_he
has content only once the form is posted, otherwise it's empty. On the other hand
$i
is already defined. So as I load the page I get values 1, 2, 3 on the fields.
I'd like to get values on the files only once the user post the forum. As I load the page the fields should be empty.
Thank you