I'm hoping to add an extra field (Phone) to an existing php contact form used in OptimizePress. I'm having some issues trying to get it working mainly because I'm not a coder. Was wondering if someone can quickly give me a hand just to add this one field?
Thanks in advance!
<?php $errors = '';
$myemail = 'email@example.com';//<-----Put Your email address here.
$errors .= "\n Error: all fields are required. Press the back button in your browser to re-enter your information";
$name = $_POST['name'];
$email_address = $_POST['email'];
$errors .= "\n Error: Invalid email address. Press the back button in your browser to re-enter your information";
$to = $myemail;
$email_subject = "Contact form submission: $name";
$email_body = "You have received a new message. ".
" Here are the details:\n Name: $name \n Email: $email_address";
$headers = "From: $myemail\n";
$headers .= "Reply-To: $email_address";
//redirect to the 'thank you' page
header('Location: http://www.thankyoupage.com');//<-----Enter your thank you page URL here
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<title>Form Submission Handler</title>
<!-- This page is displayed only if there is some error -->