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
|
<?php
header ("Refresh: 5;URL=index.html");
print "<center><br><br>Redirection vers l'index dans 5sec<br><br>";
$Gouv = $_POST['Gouvernerat'];echo"hello";
$Codesite = $_POST['Code_du_site'];
$Nomsite = $_POST['Nom_du_site'];
$adrs = $_POST['adresse'];
$Prop = $_POST['Proprietaire'];
$Tel = $_POST['Telephone'];
$Mun = $_POST['Municipalite'];
$bdd="essai";
$host="localhost";
$user="root";
$pass="";
$nomtable="walid";
$serveur=mysql_connect($host, $user, $pass) or die('Erreur de connexion');
mysql_select_db($bdd) or die('Base inexistante');
$sql="SELECT * FROM walid WHERE Code_du_site='$Codesite'";
$resultat=mysql_query ($sql);
$nb=mysql_num_rows($resultat);
$sql="INSERT INTO walid VALUES ('$Gouv', '$Codesite', '$Nomsite', '$adrs', '$Prop', '$Tel', '$Mun')";
$resultat=mysql_query ($sql);
echo '</center>';
mysql_close($serveur);
}
?> |
Partager