Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(isset($_POST['submit'])) {
- $message =
- 'Full Name: '.$_POST['name'].'<br />
- Email: '.$_POST['email'].'<br />
- Phone: '.$_POST['phoneNumber'].'<br />
- Service: '.$_POST['services'].'<br />
- Message: '.$_POST['messageArea'].'
- ';
- require "phpmailer/PHPMailerAutoload.php";
- $mail = new PHPMailer();
- $mail->IsSMTP();
- $mail->SMTPAuth = true;
- $mail->SMTPSecure = "ssl";
- $mail->Host = "smtp.gmail.com";
- $mail->Port = 465;
- $mail->Encoding = '7bit';
- $mail->Username = "xxxxxx@gmail.com";
- $mail->Password = "xxxxxxxxx";
- $mail->SetFrom($_POST['email'], $_POST['name']);
- $mail->AddReplyTo($_POST['email'], $_POST['name']);
- $mail->Subject = "Message from TheRejuviner.com";
- $mail->MsgHTML($message);
- $mail->AddAddress("xxxxxx@gmail.com", "xxxx");
- $result = $mail->Send();
- $message = $result ? 'Successfully Sent!' : 'Sending Failed';
- unset($mail);
- }
- ?>
- <!DOCTYPE html>
- <html lang="en">
- <body>
- <div>
- <!-- ######### MAIN CONTENT AREA######### -->
- <div>
- <div>
- <h1>Contact Form</h1>
- <form name="contact_form" method="post" action="" class="form_holder">
- <div>
- <!-- ###NAME LABEL AND FIELD### -->
- <label for="name"><span class="star">∗</span>Your Name :
- <input name="name" type="text" id="name_field" placeholder="e.g. John Doe..." title="Enter your full name." autocomplete="off" autofocus>
- </label>
- <!-- ###END NAME LABEL AND FIELD### -->
- </div>
- <div>
- <!-- ###EMAIL LABEL AND FIELD### -->
- <label for="email"><span class="star">∗</span>Your Email :
- <input name="email" type="text" id="email_field" placeholder="e.g. johndoe@email.com..." title="Enter your email address." autocomplete="off" autofocus>
- </label>
- <!-- ###END EMAIL LABEL AND FIELD### -->
- </div>
- <div>
- <!-- ###PHONE NUMBER LABEL AND FIELD### -->
- <label for="phoneNumber"><span class="star">∗</span>Your Phone :
- <input name="phoneNumber" type="text" id="phone_number_field" placeholder="e.g. (777)333-4444..." title="Enter your phone number." autocomplete="off" autofocus>
- </label>
- <!-- ###END PHONE NUMBER LABEL AND FIELD### -->
- </div>
- <div class="contact_input">
- <!-- ###SERVICES LABEL AND FIELD### -->
- <label for="services"><span class="star">∗</span>Select Service :
- <select name="services" id="services" title="Select which service you are inquiring for" autofocus>
- <option value="Empty">...</option>
- <option value="Reiki">Reiki Session</option>
- <option value="Holographic Memory Resolution">HMR Session</option>
- <option value="Akashic Records">Akashic Records Session</option>
- <option value="Full Package">Full Package Session</option>
- <option value="None">None</option>
- </select>
- </label>
- <!-- ###END SERVICES LABEL AND FIELD### -->
- </div>
- <div>
- <!-- ###PHONE NUMBER LABEL AND FIELD### -->
- <label for="message"><span class="star star_text">∗</span>Your message :
- <textarea id="message_area" name="messageArea" autofocus></textarea>
- </label>
- <!-- ###END PHONE NUMBER LABEL AND FIELD### -->
- </div>
- <!-- ###SUBMIT BUTTON### -->
- <div>
- <input type="submit" id="submit" name="submit" value="submit" autofocus required />
- </div>
- <!-- ###END SUBMIT BUTTON### -->
- </form>
- <p><?php if(!empty($message)) echo $message; ?></p>
- </div>
- </div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement