Bonjour,
aprés plusieurs heures je jette l'éponge si vous pouvez me dire ou est l'erreur ce serait sympa.
L'erreur se trouve au niveau du

qui correspond à la ligne 18 et si vous pouvez me dire si le reste du code est bon ce serait sympa.
<?php
if (isset($_POST['datesaisie']) AND isset($_POST['numcmd']) AND isset($_POST['entrepot']) AND isset($_POST['transporteur']) AND isset($_POST['fournisseur']) AND isset($_POST['pal']) AND isset($_POST['dateenl']) AND isset($_POST['dateliv']) AND isset($_POST['appro']) AND isset($_POST['saisiepar']) AND isset($_POST['etatcmd'])) // Si les variables existent
{

if ($_POST['datesaisie'] != NULL AND $_POST['numcmd'] != NULL $_POST['entrepot'] != NULL $_POST['transporteur'] != NULL $_POST['fournisseur'] != NULL $_POST['pal'] != NULL $_POST['dateenl'] != NULL $_POST['dateliv'] != NULL $_POST['appro'] != NULL $_POST['saisiepar'] != NULL $_POST['etatcmd'] != NULL) // Si on a quelque chose à enregistrer
{
// D'abord, on se connecte à MySQL
mysql_connect("localhost", "root", "mysql");
mysql_select_db("infos");
// On utilise les fonctions PHP mysql_real_escape_string et htmlspecialchars pour la sécurité
$datesaisie = mysql_real_escape_string(htmlspecialchars($_POST['datesaisie']));
$numcmd = mysql_real_escape_string(htmlspecialchars($_POST['numcmd']));
$entrepot = mysql_real_escape_string(htmlspecialchars($_POST['entrepot']));
$transporteur = mysql_real_escape_string(htmlspecialchars($_POST['transporteur']));
$fournisseur = mysql_real_escape_string(htmlspecialchars($_POST['fournisseur']));
$pal = mysql_real_escape_string(htmlspecialchars($_POST['pal']));
$dateenl = mysql_real_escape_string(htmlspecialchars($_POST['dateenl']));
$dateliv = mysql_real_escape_string(htmlspecialchars($_POST['dateliv']));
$appro = mysql_real_escape_string(htmlspecialchars($_POST['appro']));
$saisiepar = mysql_real_escape_string(htmlspecialchars($_POST['saisiepar']));
$etatcmd = mysql_real_escape_string(htmlspecialchars($_POST['etatcmd']));
// Ensuite on enregistre le message
mysql_query("INSERT INTO infos VALUES('', '$datesaisie', '$numcmd', '$entrepot', '$transporteur', '$fournisseur', '$pal', '$dateenl', '$dateliv', '$appro', '$saisiepar', '$etatcmd')");
// On se déconnecte de MySQL
mysql_close();
}
}
// Que l'on ait enregistré des données ou pas...
// On affiche le formulaire puis les 10 derniers messages
// Tout d'abord le formulaire :
?>
<table width="1024" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2"><img src="Logos/HORIZONTAL-BASELINE-pt.JPG" width="305" height="79" alt="logo" /></td>
</tr>
<tr align="left" valign="top">
<td width="195"> </td>
<td width="823" align="center">SAISIE DES COMMANDES</td>
</tr>
<tr align="left" valign="top">
<td height="76"><p><br />
<a href="index.php" target="_self">Saisie des commandes</a><br />
<a href="all_cmd.php">Toutes les commandes</a><br />
-------------------------------<br />
<a href="nc_cmd.php">Commandes non validées</a><br />
<a href="ok_cmd.php">Commandes validées</a><br />
-------------------------------<br />
Recherche par commande<br />
Recherche par fournisseur
<br />
-------------------------------<br />
Ajout de fournisseur<br />
Ajout de transporteur<br />
Ajout approvisionneur
<br />
-------------------------------<br />
</p></td>
<td><br />
<table width="830" border="1" cellspacing="0" cellpadding="0">
<tr>
<td width="175">Date de saisie:</td>
<td width="230"><form id="form1" name="form1" method="post" action="index.php">
<label>
<input type="text" name="datesaisie" id="saisie" tabindex="1" />
</label>
</form></td>
<td width="175">Date d'enlèvement:</td>
<td width="233"><form id="form7" name="form7" method="post" action="index.php">
<label>
<input type="text" name="dateenl" id="date_enl" tabindex="7" />
</label>
</form></td>
</tr>
<tr>
<td>n° de commande:</td>
<td><form id="form2" name="form2" method="post" action="index.php">
<label>
<input type="text" name="numcmd" id="num_cmd" tabindex="2" />
</label>
</form></td>
<td>Date de livraison:</td>
<td><form id="form8" name="form8" method="post" action="index.php">
<label>
<input type="text" name="dateliv" id="date_liv" tabindex="8" />
</label>
</form></td>
</tr>
<tr>
<td>Entrepôt:</td>
<td><form id="form3" name="form3" method="post" action="index.php">
<label>
<input type="text" name="entrepot" id="entrepot" tabindex="3" />
</label>
</form></td>
<td>Choix de l'appro:</td>
<td><form id="form9" name="form9" method="post" action="index.php">
<label>
<select name="appro" id="appro" tabindex="9">
</select>
</label>
</form></td>
</tr>
<tr>
<td>n° transporteur:</td>
<td><form id="form4" name="form4" method="post" action="index.php">
<label>
<input type="text" name="transporteur" id="transporteur" tabindex="4" />
</label>
</form></td>
<td>Choix du saisisseur:</td>
<td><form id="form10" name="form10" method="post" action="index.php">
<label>
<select name="sasie_by" id="sasiepar" tabindex="10">
</select>
</label>
</form></td>
</tr>
<tr>
<td>n° de fournisseur:</td>
<td><form id="form5" name="form5" method="post" action="index.php">
<label>
<input type="text" name="numfour" id="numfour" tabindex="5" />
</label>
</form></td>
<td>Etat de la commande:</td>
<td><form id="form11" name="form11" method="post" action="index.php">
<label>
<input type="text" name="etatcmd" id="etatcmd" tabindex="11" />
</label>
</form></td>
</tr>
<tr>
<td>Nbre de palette(s):</td>
<td><form id="form6" name="form6" method="post" action="index.php">
<label>
<input type="text" name="pal" id="pal" tabindex="6" />
</label>
</form></td>
<td> </td>
<td> </td>
</tr>
</table> <br />
<table width="830" border="1" cellspacing="0" cellpadding="0">
<tr align="right">
<td><form id="form12" name="form12" method="post" action="index.php">
<label>
<input type="submit" name="ENVOYER" id="ENVOYER" value="Envoyer" tabindex="12" />
</label>
</form></td>
</tr>
</table>