EVOLUTION-MANAGER
Edit File: thank-you.php
<?php if(!isset($_POST['commentSubmit'])){ echo '<script type="text/javascript">window.location.href="contact-deslabs.php"</script>'; }?> <?php require_once('includes/header.php'); ?> <content> <div id="content"> <div id="mainContent"> <h1>Thank You For Contacting DesLabs</h1> <div id="contentLeftBorder"> <div id="contentRightBorder"> <?php $toEmail = "acmeous@gmail.com"; $fromEmail = $_REQUEST['commentEmail']; $name = $_REQUEST['commentName']; $phone = $_REQUEST['commentPhone']; $regarding = $_REQUEST['commentRegarding']; $subject = $name . " has contacted you from DesLabs.com"; //$_REQUEST['subject']; $message = "Hi,\n\n" . $name . " has contacted you from DesLabs.com. Below is the message by the sender: \n\n Name: ".$name." \n\n Email: ".$fromEmail." \n\n Phone: ".$phone." \n\n Regarding: ".$regarding."\n\n Message:".$_REQUEST['commentDetails']; $headers = 'From: '. $fromEmail . "\r\n" . 'Reply-To: '. $fromEmail . "\r\n" . 'X-Mailer: PHP/' . phpversion(); if (!preg_match("/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/", $fromEmail)) { echo "<h4>Invalid email address, please enter a proper email address so that we can get back to you.</h4>"; echo "<a href='javascript:history.back(1);'>Back</a>"; } elseif ($subject == "") { echo "<h4>No subject provided, please provide some subject.</h4>"; echo "<a href='javascript:history.back(1);'>Back</a>"; } elseif ($message == "") { echo "<h4>No message provided. Please provide some message for us.</h4>"; echo "<a href='javascript:history.back(1);'>Back</a>"; } elseif ($name == "") { echo "<h4>No Name provided. Please provide your name so that we can talk better.</h4>"; echo "<a href='javascript:history.back(1);'>Back</a>"; } /* Sends the mail and outputs the "Thank you" string if the mail is successfully sent, or the error string otherwise. */ elseif (mail($toEmail,$subject,$message,$headers)) { echo '<h4>Thanks for your interest in Us.</h4><p>We will take your suggestions/feedback/project details very seriously and will get back to you very soon.</p><p><a href="about-deslabs.php">Learn more about Us.</a> <a href="">We are Hiring!</a></p>'; } else { echo "<h4>Sorry, can't send email. Please try again. Thanks.</h4>"; } ?> </div> </div> </div> <?php require_once('includes/footer.php'); ?>