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
|
<?php require_once '../webadmin/configure.php';
$ara = explode("|", $_SESSION['vCode']); $verification = $_POST['verification']; $page = $_GET["page"];
if ($ara[0] == $verification) {
$name = $_POST["txtName"]; $email = $_POST["txtEmail"]; $tel = $_POST["txtTel"]; $title = $_POST["txtTitle"]; $message = $_POST["txtMessage"]; $userip = get_client_ip();;
$sql = "insert into enquiry (user_firstname, email, tel, title, content, createdate, responded, deleted, lastupdate, ip_address, status) values (?,?,?,?,?,?,?,?,?,?,?)";
$parameters = array($name, $email, $tel, $title, $message, $nowdate, 0, 0, $nowdate, $userip, 1);
bind_pdo($sql, $parameters);
}else{ echo "<script>alert('驗證碼錯誤'); history.back();</script>"; exit; }
if ($page == 'banquest') header("Location: ../banquet/contact.php?msg=1"); elseif ($page == 'wedding') header("Location: ../wedding/contact.php?msg=1"); else echo "<script>alert('Error'); history.back();</script>"; ?>
|