voici mon code d'ajout: et je veut le faire mise a jour suivant la date_client: je veut un exemple <html> <body> <? $nom_client=$_POST['nom']; $prenom_client=$_POST['prenom']; $date_client=$_POST['date']; $mail_client=$_POST['mail']; $adresse_client=$_POST['adresse']; $n_portable=$_POST['numportable']; $n_fixe=$_POST['numfixe']; $hisorique=$_POST['hist']; $publicite=$_POST['publicite']; $mere_client=$_POST['nomdelamere']; $diagnostic_client=$_POST['diagnostic']; $observation_client=$_POST['observa'];
mysql_connect("localhost","root","") or die ("Impossible de se connecter à MySQL"); mysql_select_db("pro") or die("Impossible de sélectionner la base de données"); $query_string="INSERT INTO etudiant VALUES ('$nom_client','$prenom_client','$date_client','$mail_client','$adresse_client','$n_portable', '$n_fixe','$hisorique','$publicite','$mere_client','$diagnostic_client','$observation_client')"; $query=mysql_query($query_string); if ($query) {
?> <script language=javascript> alert('Votre requête a bien été enregistrée');
</script> <? } else { ?> <script language=javascript> alert('Il y a eu un problème avec votre requête');
</script>
<? } # // déconnection avec MySQL # mysql_close(); ?> </body> </html>
|