File manager - Edit - /home/custbahd/public_html/order/business/index.php
Back
<?php include_once 'conn.php'; if(isset($_POST['submit'])) { $category = $_POST["category"]; $item = $_POST["item"]; $coname = $_POST["coname"]; $colors = $_POST["colors"]; $brandarea = $_POST["brandarea"]; $description = $_POST["description"]; $type = $_POST["type"]; $quantity = $_POST["quantity"]; $clientname = $_POST["clientname"]; $clientnumber = $_POST["clientnumber"]; $clientemail = $_POST["clientemail"]; $sql = "INSERT INTO orders (category, item, coname, colors, brandarea, description, type, quantity, clientname, clientnumber, clientemail) VALUES ('$category','$item','$coname','$colors','$brandarea','$description','$type','$quantity','$clientname','$clientnumber','$clientemail')"; 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"; $category = $_POST["category"]; $item = $_POST["item"]; $coname = $_POST["coname"]; $colors = $_POST["colors"]; $brandarea = $_POST["brandarea"]; $description = $_POST["description"]; $type = $_POST["type"]; $quantity = $_POST["quantity"]; $clientname = $_POST["clientname"]; $clientnumber = $_POST["clientnumber"]; $clientemail = $_POST["clientemail"]; // (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>Business Order for Custom Assist</b> <br><br> <b style='color:dodgerblue;'>Details</b><br><br> <b>Category</b>: $category<br><br> <b>Items</b>: $item<br><br> <b>Company</b>: $coname <br><br> <b>Colors</b>: $colors<br><br> <b>Brand Area</b>: $brandarea <br><br> <b>Description</b>: $description <br><br> <b>Type</b>: $type <br><br> <b>Quantity</b>: $quantity <br><br> <b>Client names</b>: $clientname <br><br> <b>Client Email</b>: $clientemail <br><br> <b>Client Number</b>: $clientnumber <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: 1.71 |
proxy
|
phpinfo
|
Settings