File manager - Edit - /home/custbahd/public_html/webs/order/insert.php
Back
<?php include_once 'conn.php'; if(isset($_POST['submit'])) { $sector = $_POST['sector']; $webtype = $_POST["webtype"]; $title = $_POST["title"]; $name = $_POST["name"]; $phone = $_POST["phone"]; $email = $_POST["email"]; $description = $_POST["description"]; $sql = "INSERT INTO web_orders (sector, webtype, title, name, phone, email, description) VALUES ('$sector','$webtype','$title','$name','$phone','$email','$description')"; if (mysqli_query($conn, $sql)) { echo "Your message has been received. Thank you for your feedback!"; } else { echo "Error: " . $sql . " " . mysqli_error($conn); } mysqli_close($conn); } ?> <?php $from = 'Custom Assist Inc. <info@customassistinc.com>'; $fromName = 'Custom Assist Inc.'; $subject = "Message From Client"; $sector = $_POST["sector"]; $webtype = $_POST["webtype"]; $title = $_POST["title"]; $name = $_POST["name"]; $phone = $_POST["phone"]; $email = $_POST["email"]; $description = $_POST["description"]; // (B) NOT-SO-FRIENDLY WHEN SETTING FROM, CC, BCC, HTML MAIL, ETC... $headers = implode("\r\n", [ "MIME-Version: 1.0", "Content-type:text/html;charset=UTF-8", "From: Custom Assist Client <info@customassistinc.com>", "Cc: $from" ]); $mailBody="<b>Website Order for Custom Assist</b> <br><br> <b style='color:dodgerblue;'>Details</b><br><br> <b>Sector</b>: $sector<br><br> <b>Names</b>: $name<br><br> <b>Phone Number</b>: $phone <br><br> <b>Email address</b>: $email<br><br> <b>Order</b>: $webtype Website <br><br> <b>Title</b>: $title <br><br> <b>Description</b>: $description <br><br> <b align='center'>Custom Assist Inc. ©</b>"; // Send email if(mail($from, $subject, $mailBody, $headers)){ echo '<a href="../">Back Home</a>'; }else{ echo 'Email sending failed.'; } ?>
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Generation time: 2 |
proxy
|
phpinfo
|
Settings