probleme avec update (Edit 14:26]
Posté : 13 juil. 2007, 17:13
Jai un probleme avec un upgrade qui ne se fait pas pourtant ma syntaxe me semble bonne
voici la page de mon form
et voici la page qui envoi dans ma base
et voila mon erreur mais je ne comprend pas ce qui ne va pas
Merci d'avance
voici la page de mon form
Code : Tout sélectionner
<body>
<table width="1024" border="0" cellpadding="0">
<tr>
<td align="center">
<table width="800" border="0">
<tr>
<td>Raison du retard de ravitaillement</td>
</tr>
</table>
<form action="envoi_retard.php" method="post">
<table width="800" border="0">
<tr>
<?
$numerocart = $_GET["numcart"];
?>
<td><input type="hidden" name="numcart" value="$numerocart" /></td>
<td><input type="text" name="report" size="100" /></td>
</tr>
</table>
<table width="500" border="0" cellpadding="0">
<tr>
<td align="right"><input name="envoi" type="submit" value="Envoyer" /></td>
<td align="left"><input name="reset" type="reset" value="Annuler" /></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</body>Code : Tout sélectionner
<?
include "connexion.inc";
$ncart = $_POST["numcart"];
$etat = $_POST["report"];
$sql = "UPDATE cartouches SET etat_commande = $etat WHERE num_cartouche = $ncart";
$sql_exe = mysql_query($sql);
header("Location: accueil.php");
?>
Lorsque j'affiche ma requête ça me donne ça :Notice: Undefined index: numcart in c:\gestion cartouches\envoi_retard.php on line 4
Notice: Undefined index: report in c:\gestion cartouches\envoi_retard.php on line 5
UPDATE cartouches SET etat_commande='t' WHERE num_cartouche='$ncart'
Merci d'avance