2
I have a form with several input that I create with a for cycle, I pass by POST to another page and change its name as in the example:
<form action="page2.php" method="post">
<?php
for($i=1; $i<=10; $i++){
?>
<select name=fichier<?php echo $i?> > (...)
The problem is if I don’t want to fill in the input or select, how do I receive its value? Not to repeat code for the various inpuut I have it on the other page that receives the POST.
for($i=1; $i<=10; $i++){
if (isset($_POST['fichier'.$i]))
{
$fichier = htmlentities($_POST['fichier'.$i]);
}
if(isset($_POST['fichier'.$i])== 0){
break;
}
//echo $fichier;
}