File: /home/nmel17aacb/domains/rabc1882.be/public_html/php/mail_form.php
<?php
include ("../inc/db.php");
if (isset($_POST['name'])) {
$name = addslashes($_POST['name']);
} else $name ="";
if (isset($_POST['onderwerp'])) {
$onderwerp = addslashes($_POST['onderwerp']);
} else $onderwerp = "";
if (isset($_POST['bericht'])) {
$bericht = addslashes($_POST['bericht']);
} else $bericht ="";
if (isset($_POST['email'])) {
$email = addslashes($_POST['email']);
} else $email = "";
$sql = "INSERT INTO contact_form SET naam='$name', onderwerp='$onderwerp', email='$email', bericht='$bericht'";
if ($db->query($sql) === TRUE) {
header("Location:../index.php#contact0");
} else {
header("Location:../index.php#contact0");
}
$db->close();
?>