1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| $requet = mysql_query('SELECT * FROM matable where champ1="'.$name.'" and champ2="A"')or die("Erreur SQL : $query<br/>".mysql_error());
$exist=false;
while ($donnees = mysql_fetch_array($requet) ){
if( trim($donnees['champ1'])== trim($name)
&& trim($donnees['champ12'])==trim($prenevoie)
&& trim($donnees['champ123'])==trim($catevoie)
){
//test L'existance du utilisateur a ajouter
$exist=true;
}else {
$exist=false;
}
}
if ($exist==true){
echo' <center> cette utilisateur existe deja dans la listes des utilisateurs veuillez saisir a nouveau <br><br><br> <input type="button" value="Retour" style="font-family:Verdana,serif; font-style:normal; font-weight:normal; font-size:12px; color:black; background-color:rgb(255,153,0); margin:1px; padding:1px; border-width:1px;
border-color:black;border-style:groove;"name="retour" onclick=" javascript:history.go(-1)"/> </center>';
exit;
}else{
//récupération des valeurs des champs:
ici je fait mon requet d'insertion |
Partager