1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
<?php
$c=mysql_connect("localhost","root","");
mysql_select_db("gestion des interventions",$c);
$nvehv=$_POST['nvehv'];
$nomv=$_POST['nomv'];
$genv=$_POST['genv'];
$puiv=$_POST['puiv'];
$dativ=$_POST['dativ'];
$nbiv=$_POST['nbiv'];
$sql="select * from vehicule where nvehv='$nvehv'";
$rep=mysql_query($sql);
$nb=mysql_num_rows($rep);
if ($nb!=0) 'si je l'ai trouver
echo"Clé En Double";
else 'Sinon
{$sql1="insert into vehicule values('$nvehv' , '$nomv' , '$genv' , '$puiv' , '$dativ' , '$nbiv')";
mysql_query($sql1);
echo"<center><h1>Enregistrement Reussi</h1></center>";
}
mysql_close();
?> |
Partager