Hi everybody. I want to take from 10 fields times two, the names and the firstnames. How to send that datas to the next page? Of course i have tried something but it does not work. YThis is the script :"
the file form.php
<html>
<head><title></title></head>
<body>
<form action="soumet.php" method=post>
<?
settype($nbnom, "integer");
$nbnom = 10;
for ($i=1; $i<=$nbnom; $i++) {?>
Prenom : <input name="prenom[]" type="text">
Nom : <input name="nom[]" type="text">
<br>
<?
}
?>
<br>
<input type="submit">
</form>
</body>
</html>
The file soumet.php
<html>
<head><title></title></head>
<body>
<?
settype($nom, "string");
settype($prenom, "string");
for
($i=1; $i<=count($nom); $i++)
{
$nom = $nom[$i];
$prenom = $prenom[$i];
echo("Nom : $nom Prenom : $prenom <br>");
}
?>
</body>
</html>
What can be the matter on these codes?
the file form.php
<html>
<head><title></title></head>
<body>
<form action="soumet.php" method=post>
<?
settype($nbnom, "integer");
$nbnom = 10;
for ($i=1; $i<=$nbnom; $i++) {?>
Prenom : <input name="prenom[]" type="text">
Nom : <input name="nom[]" type="text">
<br>
<?
}
?>
<br>
<input type="submit">
</form>
</body>
</html>
The file soumet.php
<html>
<head><title></title></head>
<body>
<?
settype($nom, "string");
settype($prenom, "string");
for
($i=1; $i<=count($nom); $i++)
{
$nom = $nom[$i];
$prenom = $prenom[$i];
echo("Nom : $nom Prenom : $prenom <br>");
}
?>
</body>
</html>
What can be the matter on these codes?
