Contact Form PHP not being sent to email
Hello i have a contact form PHP from a theme i purchased. I've been trying
to make a customized form with it but with no luck. Tried changing the
variables around to work for the one i made myself but it is not being
sent to the email i want the information to go to.
This is what i have in my HTML
<form id="" action="application/application.php" method="post"
class="validateform" name="send-contact">
<div id="sendmessage">
Your message has been sent. Thank you!
</div>
Youtube Channel Name <br> <input type="text"
name="youtubename" placeholder="* Enter Your YouTube
Name">
<div class="validation"></div>
First Name <br> <input type="text" name="firstname"
placeholder="* Enter Your First Name">
<div class="validation"></div>
Last Name <br> <input type="text" name="lastname"
placeholder="* Enter Your Last Name">
<div class="validation"></div>
Your Paypal Email Address <br> <input type="text"
name="paypal" placeholder="* Enter Your Paypal
Email">
<div class="validation"></div>
Your YouTube Email Address <br> <input type="text"
name="youtubeemail" placeholder="* Enter Your YouTube
Email">
<div class="validation"></div>
Skype <br> <input type="text" name="skype"
``placeholder="* Enter Your Skype Name">
<div class="validation"></div>
<button class="btn btn-theme margintop10 pull-left"
type="submit">Submit Application</button>
</form>
And for my PHP i have the following;
<?php
include 'config.php';
error_reporting (E_ALL ^ E_NOTICE);
$post = (!empty($_POST)) ? true : false;
if($post)
{
$youtubename = stripslashes($_POST['youtubename']);
$firstname = stripslashes($_POST['firstname']);
$lastname = stripslashes($_POST['lastname']);
$paypal = stripslashes($_POST['paypal']);
$youtubeemail = trim($_POST['youtubeemail']);
$skype = stripslashes($_POST['skype']);
$error = '';
if(!$error)
{
$mail = mail(WEBMASTER_EMAIL, $subject, $message
"From: ".$firstname." <".$youtubename.">\r\n"
."Reply-To: ".$youtubeemail."\r\n"
."X-Mailer: PHP/" . phpversion());
if($mail)
{
echo 'OK';
}
}
}
?>
And in my config.php i have
<?php
// To
define("WEBMASTER_EMAIL", 'Support@XvinityNetwork.com');
?>
I'm not very savvy with HTML and i have a member of my staff that does
this however has had an emergency issue to attend to this and i need to
get this contact form up and running. I do have the default form that came
with the theme and it works perfectly so im guessing i've done something
wrong here. Would appreciate the help!
No comments:
Post a Comment