J'aurais aimé savoir ce que signifiais cette erreur
unexpected $
de meme je me demandais ou je pouvais trouver la signication de chacune des erreurs (comme sa sa m'éviterais de vous embeter pour sa a chaque fois
lol
merci
<? ..................
// connection à la DB
$link = mysql_connect ($host,$user,$pass) or die ('Erreur : '.mysql_error() );
mysql_select_db($db) or die ('Erreur :'.mysql_error());
$id =$_GET['id'];
$select = "SELECT * FROM produit2 WHERE reference LIKE '$id'";
$result = mysql_query($select,$link) or die ('Erreur : '.mysql_error() );
$row = mysql_fetch_assoc($result);
$nom = $row['nom'];
$formule = $row['formule'];
$reference = $row['reference'];
$num = $row['numero_cass'];
$toxicite = $row['toxicite'];
$localisation = $row['localisation'];
$disponibilite = $row['disponibilite'];
$quantite = $row['quantite'];
$nom2 = $_POST['nom'];
$formule2 = $_POST['formule'];
$reference2 = $_POST['reference'];
$num2 = $_POST['numero_cass'];
$toxicite2 = $_POST['toxicite'];
$localisation2 = $_POST['localisation'];
$disponibilite2 = $_POST['disponibilite'];
$quantite2 = $_POST['quantite'];
$numero_cass2 = $_POST['numero_cass'];
if(isset($_POST['envoi']))
{
if ($nom == '' || $formule == '' || $localisation == '' || $quantite == '' || $reference == '' || $numero_cass == '')
{
?>
<form action="<?php $_SERVER['PHP_SELF'] ?>" method="post">
<table summary="">
<col width="250" title="titres" />
<col width="15" title="oblige" />
<col width="250" title="donnees" />
<col width="250" title="nouvelle_donnees" />
<tr width="30%" height="15"><td><b>Nom de la molécule :</td>
<td><div style="color: #ff0000; text-align: center; font-weight: bold"></div></td>
<td><b><?php print $row['nom']; ?></b></td>
<td><b><input type="text" name="nom"></b></td></tr>
<tr width="30%" height="29"><td><b>Formule brute de la molecule:</td>
<td><div style="color: #ff0000; text-align: center; font-weight: bold"></div></td>
<td><b><?php print $row['formule']; ?></b></td>
<td><b><input type="text" name="formule"></b></td></tr>
<tr width="30%" height="29"><td><b>Localisation de la Molécule:</td>
<td><div style="color: #ff0000; text-align: center; font-weight: bold"></div></td>
<td><b><?php print $row['localisation']; ?></b></td>
<td><b><input type="text" name="localisation"></b></td></tr>
<tr width="30%" height="29"><td><b>Disponibilité :</b></td>
<td><div style="color: #ffffff; text-align: center; font-weight: bold"></div></td>
<td><b><?php print $row['disponibilite']; ?></b></td>
<td><b><input type="text" name="disponibilite"></b></td></tr>
<tr width="30%" height="15"><td><b>Quantité en reserve :</td>
<td><div style="color: #ff0000; text-align: center; font-weight: bold"></div></td>
<td><b><?php print $row['quantite']; ?></b></td>
<td><b><input type="text" name="quantite"></b></td></tr>
<tr width="30%" height="29"><td><b>Reference de la molecule:</td>
<td><div style="color: #ff0000; text-align: center; font-weight: bold"></div></td>
<td><b><?php print $row['reference']; ?></b></td>
<td><b><input type="text" name="reference"></b></td></tr>
<tr width="30%" height="29"><td><b>Numero de CAS:</td>
<td><div style="color: #ff0000; text-align: center; font-weight: bold"></div></td>
<td><b><?php print $row['numero_cass']; ?></b></td>
<td><b><input type="text" name="numero_cass"></b></td></tr>
<tr width="30%" height="29"><td><b>Toxicite :</b></td>
<td><div style="color: #ffffff; text-align: center; font-weight: bold"></div></td>
<td><b><?php print $row['toxicite']; ?></b></td>
<td><b><input type="text" name="toxicite"></b></td></tr>
<tr><td colspan="4"><div style="text-align:center;"><input type="submit" class="verif" name="envoi" value="Envoyer" />
<input type="reset" class="verif" value="Tout effacer" /><input type="submit" value="Imprimer" onclick="print();">
<input type="submit" value="fermer" onClick="window.close()";></div></td></tr>
</TABLE></form>
<?php
}
else{
/* Affichage du message final des informations reçues */
print "<h3>Merci ! Voici les modifications que vous avez fournies pour cette molécule</h3>\n";
print "<p>Informations sur la nouvelle molecule:</p>\n";
print "<b>Son nom :</b>".$nom2."<br />\n";
print "<b>Sa formule Brute :</b>".$formule2."<br />\n";
print "<b>Sa localisation :</b>".$localisation2."<br />\n";
print "<b>Sa quantite en reserve :</b>".$quantite2."<br />\n";
print "<b>Sa reference :</b>".$reference2."<br />\n";
print "<b>Son numero de CASE :</b>".$numero_cass2."<br />\n";
if ($toxicite !==''){
print "<b>Sa toxicite s'il y en a une :</b> ".$toxicite2."<br />\n";
}
print("<p>Retour vers le formulaire de recherche pour modification, cliquez <a href=\"modification.php\" title=\"Retour vers le formulaire\">ICI</a></p>");
print("<p>Retour vers l'Index, cliquez <a href=\"index.html\" title=\"Retour a l'index\">ICI</a></p>");
}
}
/* Si cette page s'ouvre pour la première fois sans que le bouton soumettant le formulaire n'ait
été cliqué, alors on affiche le formulaire normalement */
else
{
?>
<H3><strong>Formulaire de modification de produits</strong></H3>
<form action="<?php $_SERVER['PHP_SELF'] ?>" method="post">
<table summary="">
<col width="250" title="titres" />
<col width="15" title="oblige" />
<col width="250" title="donnees" />
<col width="250" title="nouvelle_donnees" />
<tr width="30%" height="15"><td><b>Nom de la molécule :</td>
<td><div style="color: #ff0000; text-align: center; font-weight: bold"></div></td>
<td><b><?php print $row['nom']; ?></b></td>
<td><b><input type="text" name="nom"></b></td></tr>
<tr width="30%" height="29"><td><b>Formule brute de la molecule:</td>
<td><div style="color: #ff0000; text-align: center; font-weight: bold"></div></td>
<td><b><?php print $row['formule']; ?></b></td>
<td><b><input type="text" name="formule"></b></td></tr>
<tr width="30%" height="29"><td><b>Localisation de la Molécule:</td>
<td><div style="color: #ff0000; text-align: center; font-weight: bold"></div></td>
<td><b><?php print $row['localisation']; ?></b></td>
<td><b><input type="text" name="localisation"></b></td></tr>
<tr width="30%" height="29"><td><b>Disponibilité :</b></td>
<td><div style="color: #ffffff; text-align: center; font-weight: bold"></div></td>
<td><b><?php print $row['disponibilite']; ?></b></td>
<td><b><input type="text" name="disponibilite"></b></td></tr>
<tr width="30%" height="15"><td><b>Quantité en reserve :</td>
<td><div style="color: #ff0000; text-align: center; font-weight: bold"></div></td>
<td><b><?php print $row['quantite']; ?></b></td>
<td><b><input type="text" name="quantite"></b></td></tr>
<tr width="30%" height="29"><td><b>Reference de la molecule:</td>
<td><div style="color: #ff0000; text-align: center; font-weight: bold"></div></td>
<td><b><?php print $row['reference']; ?></b></td>
<td><b><input type="text" name="reference"></b></td></tr>
<tr width="30%" height="29"><td><b>Numero de CAS:</td>
<td><div style="color: #ff0000; text-align: center; font-weight: bold"></div></td>
<td><b><?php print $row['numero_cass']; ?></b></td>
<td><b><input type="text" name="numero_cass"></b></td></tr>
<tr width="30%" height="29"><td><b>Toxicite :</b></td>
<td><div style="color: #ffffff; text-align: center; font-weight: bold"></div></td>
<td><b><?php print $row['toxicite']; ?></b></td>
<td><b><input type="text" name="toxicite"></b></td></tr>
<tr><td colspan="4"><div style="text-align:center;"><input type="submit" class="verif" name="envoi" value="Envoyer" />
<input type="reset" class="verif" value="Tout effacer" /><input type="submit" value="Imprimer" onclick="print();">
<input type="submit" value="fermer" onClick="window.close()";></div></td></tr>
</TABLE>
</form>
<?php
}
?>
ce petit truc est pas mal : http://www.nexen.net/erreurs/de meme je me demandais ou je pouvais trouver la signication de chacune des erreurs