Hello! I’ve been trying to get a submission form working where i can grab customers information and process it. I’d ideally like it in the following format
Youtube name: namehere
firstname: namehere
lastname: name here
email: emailhere
etc
At the moment i am getting a blank email with nothing in the email itself. The header works fine and it grabs the email and puts it in the “from:” I’m a noob to HTML and PHP and had someone do this but they are unavailable for quite a while so i need to get this fixed as soon as i can. The PHP contact form came with a theme that i purchased and it works fine in the HTML contact form that it was supplied with but i needed it changed to fit my requirements. Any help is appreciated, thanks in advance!
My HTML code.
<form id="" action="application/application.php" method="post" class="validateform" name="send-contact">
<div id="sendmessage">
Your message has been sent. Thank you!
</div>
<input type="hidden" name="subject" value="Partnership Applications" />
Youtube Channel Name <br>
<input type="text" name="ytname" placeholder="* Enter Your YouTube Name" data-rule="maxlen:4" data-msg="Please enter at least 4 chars" />
<div class="validation"></div>
First Name <br>
<input type="text" name="firstname" placeholder="* Enter Your First Name" data-msg="Please enter at least 4 chars" />
<div class="validation"></div>
Last Name <br>
<input type="text" name="lastname" placeholder="* Enter Your Last Name" data-msg="Please enter at least 4 chars" />
<div class="validation"></div>
Your Paypal Email Address <br>
<input type="text" name="ppemail" placeholder="* Enter Your Paypal Email" data-msg="Please enter a valid email" />
<div class="validation"></div>
Your YouTube Email Address <br>
<input type="text" name="email" placeholder="* Enter Your YouTube Email" data-msg="Please enter a valid email" />
<div class="validation"></div>
Skype <br>
<input type="text" name="skype" placeholder="* Enter Your Skype Name" data-msg="Please enter at least 4 chars" />
<div class="validation"></div>
<!--<button class="btn btn-theme margintop10 pull-left" type="submit" name="submit" value="Send">Submit message</button>-->
<span class="pull-right margintop20">* Please fill all required form field, thanks!</span>
<BR>
<BR>
<b>FORM IN MAINTENANCE!PLEASE SEND ALL<br> INFORMATION ABOVE DIRECTLY TO<br> <a href="mailto:Support@xvinitynetwork.com">Support@XvinityNetwork.com</a></b>
</form>
and this is my PHP
<?php
ini_set('display_errors',1);
error_reporting(E_ALL);
/*
Credits: Bit Repository
URL: http://www.bitrepository.com/
*/
include 'config.php';
error_reporting (E_ALL ^ E_NOTICE);
$post = (!empty($_POST)) ? true : false;
if($post)
{
$ytname = stripslashes($_POST['ytname']);
$firstname = stripslashes($_POST['firstname']);
$lastname = stripslashes($_POST['lastname']);
$ppemail = trim($_POST['ppemail']);
$email = trim($_POST['email']);
$subject = stripslashes($_POST['subject']);
$skype = stripslashes($_POST['skype']);
$error = '';
if(!$error)
{
$mail = mail(WEBMASTER_EMAIL, $email, $ytname,
"From: ".$name." <".$email.">\\r\
"
."Reply-To: ".$email."\\r\
"
."X-Mailer: PHP/" . phpversion());
if($mail)
{
echo 'OK';
}
}
}
?>
My config.php includes the following;
<?php
// To
define("WEBMASTER_EMAIL", 'Support@XvinityNetwork.com');
?>
Thanks again