hjkhhrtertererrrrrerrtertertertertertertert
bnmbnerterterterterterdfgdfgdfgdfgdfgdfgdfgdfgdfg
/
home4
/
digil8bw
/
grapelegacy.com
/
Upload FileeE
HOME
<?php include_once('config/config.php'); if (!empty($_POST['email'])) { if (empty($_POST["name"])) { $_SESSION['msg1'] = "Please enter name"; $referer = $_SERVER['HTTP_REFERER']; header("Location: $referer"); exit(); } else { if (!preg_match("/^[a-zA-Z ]*$/", $_POST["name"])) { $_SESSION['msg1'] = "Only letters and whitespace allowed for name"; $referer = $_SERVER['HTTP_REFERER']; header("Location: $referer"); exit(); } } if (!filter_var($_POST["email"], FILTER_VALIDATE_EMAIL)) { $_SESSION['msg1'] = "Invalid email format"; $referer = $_SERVER['HTTP_REFERER']; header("Location: $referer"); exit(); } if (empty($_POST["message"])) { $_SESSION['msg1'] = "Please enter message"; $referer = $_SERVER['HTTP_REFERER']; header("Location: $referer"); exit(); } if (!empty($_POST['name']) && !empty($_POST['email']) && !empty($_POST['message'])) { $name = mysqli_real_escape_string($conn, test_input($_REQUEST['name'])); $email = mysqli_real_escape_string($conn, test_input($_REQUEST['email'])); $message = mysqli_real_escape_string($conn, test_input($_REQUEST['message'])); $sql = "Insert into request_quote set name='" . $name . "', email='" . $email . "', message='" . $message . "', created=date('Y-m-d H:i:s')"; $query = mysqli_query($conn, $sql); if ($query) { $_SESSION['msg'] = "Your details submitted successfully"; $referer = $_SERVER['HTTP_REFERER']; header("Location: $referer"); exit(); } else { $_SESSION['msg1'] = "Something error"; $referer = $_SERVER['HTTP_REFERER']; header("Location: $referer"); exit(); } } } else { header("Location: index.php"); exit(); }