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
| <?php
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$nom=$_POST['name'];
$prenom=$_POST['prenom'];
$prod=$_POST['prod'];
$born=$_POST['born'];
$ville=$_POST['ville'];
$mail=$_POST['mail'];
$phone=$_POST['phone'];
$titre=$_POST['titre'];
$syno=$_POST['syno'];
$genre=$_POST['genre'];
$duree=$_POST['duree'];
$reali=$_POST['reali'];
$link=$_POST['link'];
$message=$_POST['message'];
$sql = "INSERT INTO users (nom, prenom, prod, born, ville, mail, phone, titre, syno, genre, duree, reali, link, message)
VALUES ('$nom', '$prenom', '$prod', '$born', '$ville', '$mail', '$phone', '$titre', '$syno', '$genre', '$duree', '$reali', '$link', '$message')";
if ($conn->query($sql) === TRUE) {
header('Location: https://focusfilmsprod.fr/F%C3%A9licitation');
} else {
header('Location: https://focusfilmsprod.fr/Erreur');
}
$conn->close();
?> |
Partager