bonjour
comment recuperer les variables voici mon code:
matricule <input name="mat" type="text" />
</p>
<table width="100%" border="0" align="right">
<tr>
<td width="42%"></td>
<td width="14%"> nombre de lignes </td>
<td width="11%"><input name="nbrchamp" type="text" id="nbrchamp" size="7" /> </td>
<td width="33%"><input type="submit" name="valider" id="valider" value="Valider" /></td>
</tr>
<?php
if(isset($_POST['valider']))
{
extract($_POST);
if(empty($mat))
{
echo '<font color="red">Veuillez Remplir les champs correctement </font>';
exit(0);
}
else
{
echo"<table width=100% border=2 cellspacing=4 cellpadding=4>
<tr> <th colspan=3>Facture</th><input name=mat type=hidden value=$mat /><input type=hidden name=champ value=$nbrchamp /> </tr>";
echo'<tr>
<th scope="col"> date </th>
<th scope="col"> tarif</th>
<th scope="col"> nom</th>
</tr>';
for($i=0;$i< $nbrchamp;$i++)
{
echo'<tr>
<td> <input name="dat[0]" type="text" /></td>
<td> <input name="taf[1]" type="text" /></td>
<td> <input name="nom[2]" type="text" /></td>
</tr>';
}
echo"</table>";
}
}
?>
<p>
<table width="95%" cellspacing="0" cellpadding="0">
<tr>
<th scope="col"><input type="submit" name="ok" id="ok" value="Enregistrer">
</th>
</tr>
</table>
</form>
</form>
</fieldset>
merci d'avance