Sos programation
lepetitmichael
Messages postés
4
Statut
Membre
-
Utilisateur anonyme -
Utilisateur anonyme -
Bonjour, voici le code de mon formulaire et son code de control en php
EDIT : Ajout des balises de code
<tr><td><label for="Categorie">Categorie du produit:</label></td><td><input type="text" id="Categorie" name="Categorie" size="20" maxlength="20" /></td></tr>
<tr><td><label for="Quantite">quantite du produit:</label></td><td><input type="text" id="Quantite" name="Quantite" size="20" maxlength="20" /></td></tr>
<tr><td><label for="libell">type d'enregistrement:</label></td><td><select name="libell" id="libell">
<option value="">Choisir la transaction</option>
<option value="">EntreeStock</option>
<option value="">SortieStock</option>
<tr> </tr>
<tr><center><td><input type="submit" value="Enregistrer" name="buttonEnregistrer" />
<input type="reset" value="Annuler" name="buttonAnnuler" /></td> </center>
</tr>
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
if(empty($_POST['Numart'])
or empty($_POST['ID_Article'])
or empty($_POST['Nom_Fournisseur'])
or empty($_POST['Categorie'])
or empty($_POST['Quantite'])
or empty($_POST['libell']) )
{
?><SCRIPT LANGUAGE="JAVASCRIPT"> alert("Vous devez remplir les champs svp!"); </SCRIPT><?php
echo '<meta http-equiv="refresh" content="0; URL=ajouts_article.php">';//redirection
}
else{
$NumartS=$_POST['Numart'];
$ID_ArticleS=$_POST['ID_Article'];
$Nom_ArticleS=$_POST['Nom_Article'];
$Nom_Fournisseur=$_POST['Nom_Fournisseur'];
$CategorieS=$_POST['Categorie'];
$QuantiteS=$_POST['Quantite'];
$libell=$_POST['libell'];
EDIT : Ajout des balises de code