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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| <?php
$dbhost="localhost";
$dblogin="root";
$dbpassword="xxxxxxxxxxx";
$dbname="anuuaire";
$nom_type = $_GET["nom_type"];
$nom = $_GET["nom"];
$societe = $_GET["societe"];
$adresse = $_GET["adresse"];
$codepostal = $_GET["codepostal"];
$ville = $_GET["ville"];
$pays = $_GET["pays"];
$telephone = $_GET["telephone"];
$fax = $_GET["fax"];
$num_abrege = $_GET["num_abrege"];
$fonction = $_GET["fonction"];
$email = $_GET["email"];
$portable = $_GET["portable"];
$secretaire = $_GET["secretaire"];
$service = $_GET["service"];
mysql_connect($dbhost,$dblogin,$dbpassword);
mysql_select_db($dbname);
$result=mysql_query("INSERT INTO contact (nom_type,nom,societe,adresse,codepostal,ville,pays,telephone;fax;num_abrege,fonction,email,portable,secretaire,service) VALUES ($nom_type','$nom','$societe','$adresse','$codepostal','$ville','$pays','$telephone','$fax','$num_abrege','$fonction','$email','$portable','$secretaire','$service')");
if (!$result) {
echo "L'ajout d'un nouveau contact a échoué.<br>";
} else {
echo "Ajout nouveau contact : OK.";
}
mysql_close();
?> |
Partager