par
Z3lg4dis » 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
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>
et voici la page qui envoi dans ma base
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");
?>
et voila mon erreur mais je ne comprend pas ce qui ne va pas
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
Lorsque j'affiche ma requête ça me donne ça :
UPDATE cartouches SET etat_commande='t' WHERE num_cartouche='$ncart'
Merci d'avance
Jai un probleme avec un upgrade qui ne se fait pas pourtant ma syntaxe me semble bonne
voici la page de mon form
[code]<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]
et voici la page qui envoi dans ma base
[code]<?
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");
?>
[/code]
et voila mon erreur mais je ne comprend pas ce qui ne va pas
[quote]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
[/quote]
Lorsque j'affiche ma requête ça me donne ça :
[quote]UPDATE cartouches SET etat_commande='t' WHERE num_cartouche='$ncart'[/quote]
Merci d'avance