관리-도구
편집 파일: appointment_sent.php
<?php include 'admin/process/config.php'; $name = $_POST['name']; $email = $_POST['email']; $phone = $_POST['phone']; $category = $_POST['category']; $msg = $_POST['msg']; if($email != '') {?> <?php //$sql = "INSERT INTO `quote`(`name`,`email`,`phone`,`category`,`message`,`amount`,`link`,`payment_id`) VALUES ('$name','$email','$phone','$category','$msg','','','')"; //if ($conn->query($sql) === TRUE) $stmt = $conn->prepare("INSERT INTO quote (`name`, `email`, `phone`, `category`, `message`) VALUES (?, ?, ?, ?, ?)"); $stmt->bind_param("sssss", $name, $email, $phone, $category,$msg); $sql = $stmt->execute(); if ($sql === TRUE) { $to = 'info@zamorindecorate.com'; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= "From: " . $email . "\r\n"; // Sender's E-mail $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $message ='<table style="width:100%"> <tr><td>Name: '.$name.'</td></tr> <tr><td>Email: '.$email.'</td></tr> <tr><td>Email: '.$phone.'</td></tr> <tr><td>Category: '.$category.'</td></tr> <tr><td>Message : '.$msg.'</td></tr> </table>'; if (@mail($to, $email, $message, $headers)) { echo "<script>location.href='index.php?p=6&m=ok';</script>"; //header("index.php?p=6&add=ok"); }else{ echo 'failed'; } } else { echo "Error: " . $sql . "<br>" . $conn->error; } } else{ echo "<script>location.href='index.php?p=6&m=fill email';</script>"; } $conn->close(); ?>