/    Sign up×
Community /Pin to ProfileBookmark

Help Please – Missing form data

I am new to this and I have a form on my website, the problem I have is that when someone completes the form, I receive the email but no data shows. I receive the following:

name:
subject:
email:
message:

I have been looking at this all afternoon now and getting nowhere fast. Can one of you guys please have a look at it for me?

HTML for the page which the form is on:

<!–
Author: W3layouts
Author URL: [url]http://w3layouts.com[/url]
License: Creative Commons Attribution 3.0 Unported
License URL: [url]http://creativecommons.org/licenses/by/3.0/[/url]
–>
<!DOCTYPE html>
<html>
<head>
<title>Online Kitbag – We market your business online to get you more customers| Contact</title>
<link href=”css/bootstrap.css” rel=’stylesheet’ type=’text/css’ />
<!– jQuery (necessary for Bootstrap’s JavaScript plugins) –>
<script src=”js/jquery.min.js”></script>
<!– Custom Theme files –>
<link href=”css/style.css” rel=”stylesheet” type=”text/css” media=”all” />
<!– Custom Theme files –>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<meta name=”keywords” content=”ONLINE KITBAG, Websites, online presence, commercially viable,
Smartphone and tablet Compatible website, modern, social media and search engine marketing” />
<script type=”application/x-javascript”> addEventListener(“load”, function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<!–webfont–>
<link href=’http://fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,400italic,500,500italic,700,700italic,900,900italic‘ rel=’stylesheet’ type=’text/css’>
</head>
<body>
<!– header-section-starts –>
<div class=”header”>
<div class=”container”>
<div class=”logo”>
<a href=”index.html”><img src=”images/logo.png” class=”img-responsive” alt=”” /></a>
</div>
<div class=”header-right”>
<h4><i class=”phone”></i>(0333) 301 3498</h4>
<span class=”menu”></span>
<div class=”top-menu”>
<ul>

<li><a href=”index.html”>Home</a></li>
<li><a href=”about.hmtl”>About Us</a></li>
<li><a href=”services.html”>Services</a></li>
<li><a href=”blog.html”>Knowledge</a></li>
<li><a class=”active” href=”#”>Contact Us</a></li>
</ul>
</div>
<!– script for menu –>
<script>
$( “span.menu” ).click(function() {
$( “.top-menu” ).slideToggle( “slow”, function() {
// Animation complete.
});
});
</script>
<!– script for menu –>
<script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js”></script>
<script>
$(“#contactform”).submit(function(){
$.get(“contactsend.php”, function(data){
alert(data);
})
return false;
})
</script>
</div>
<div class=”clearfix”></div>
</div>
</div>
<!– header-section-ends –>
<div class=”content”>
<div class=”contact about-desc”>
<h3>Contact-Information</h3>
<div class=”container”>
<div class=”row”>
<div class=”col-md-8 contact_left”>
<h4>We Want to hear from you</h4>
<p class=”m_6″>Send us your feedback – anything that’s on your mind – whether good or bad, compliments or criticisms, we want to hear it. If something is bothering you, we’ll work to fix it. If you like something we’re doing, we’ll continue to do it. Your insights are critically important, and we want to make sure we’re continually raising the bar on your experience with <strong>Online</strong> Kitbag.</p>
<div class=”contact_grid contact_address”>
<h5>Online Kitbag Limited</h5>
<p>The Alexander Suite</p>
<p>Silk Point</p>
<p>Queens Avenue</p>
<p>Macclesfield</p>
<p>SK10 2BB</p>
<p>&nbsp;</p>
<p>Telephone : (0333) 301 3498</p>
<p>Email : <a href=”mailto:[email protected]“>[email protected]</a></p>
</div>
</div>
<div class=”col-md-4″>
<div class=”contact_right”>
<div class=”contact-form_grid”>
<form action=”send.php” method=”POST”>
<input type=”text” class=”textbox” value=”name” onfocus=”this.value = ”;” onblur=”if (this.value == ”) {this.value = ‘name’;}”>
<input type=”text” class=”textbox” value=”email” onfocus=”this.value = ”;” onblur=”if (this.value == ”) {this.value = ’email’;}”>
<input type=”text” class=”textbox” value=”subject” onfocus=”this.value = ”;” onblur=”if (this.value == ”) {this.value = ‘subject’;}”>
<textarea value=”message:” onfocus=”this.value = ”;” onblur=”if (this.value == ”) {this.value = ‘message’;}”>Message</textarea>
<input type=”submit” value=”Send”>
</form>
</div>
</div>
</div>
</div>
</div>
</div>

</div>
</div>
<div class=”map s-map”>
<iframe src=”https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d2385.974876241252!2d-2.1162188!3d53.272069800000004!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x487a4969cc7d0877%3A0xd2c40bc63ed1378e!2sMacclesfield%2C+Cheshire+East+SK10+2BB!5e0!3m2!1sen!2suk!4v1423748504908” frameborder=”0″ style=”border:0″></iframe>
<div class=”map-layer”></div>
</div>
</div>
<div class=”footer text-center”>
<div class=”social-icons”>
<a href=”#”><i class=”facebook”></i></a>
<a href=”https://twitter.com/onlinekitbag”><i class=”twitter”></i></a>
<a href=”#”><i class=”googlepluse”></i></a>
</div>
<div class=”copyright”>
<p>Copyright &copy; 2015 All rights reserved | <strong>Online</strong> <a href=”http://onlinekitbag.com“> Kitbag</a></p>
</div>
</div>
</body>
</html>

This is the Php for the form:

<?php

$emailFrom = “[email protected]“;
$emailTo = “[email protected]“;
$subject = “Website contact”;
$name = Trim(stripslashes

($_POST[‘name’]));
$subject = Trim(stripslashes($_
POST[‘subject’]));
$email = Trim(stripslashes($_POST[’email’]));
$message = Trim

(stripslashes($_POST[‘message’]));

// validation
$validationOK=true;
if (!$validationOK) {
print “<meta http-equiv=”refresh” content=

“0;URL=error.htm”>”;
exit;
}

// prepare email body text
$Body = “”;
$Body .= “name: “;
$Body .= $name;
$Body .= “n”;
$Body .= “subject: “;
$Body .= $subject;
$Body .= “n”;
$Body .= “email: “;
$Body .= $email;
$Body .= “n”;
$Body .= “message: “;
$Body .= $message;
$Body .= “n”;

//

send email
$success = mail($emailTo, $subject, $Body, “From: <$emailFrom>”);

// redirect to success page
if ($success){
print “<meta

http-equiv=”refresh” content=”0;URL=contactthanks.html”>”;
}
else{
print “<meta http-equiv=”refresh” content=”0;URL=error.htm

“>”;
}
?>

I am completely stuck on this now so any help would be much appreciated (especially in laymans terms)

Many thanks

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@LandslydeFeb 23.2015 — It might help you to get an answer if you'd repost this using the provided code tags. What you've posted looks like it got hit by a hurricane! Use tags when presenting code to forums. That's why they have them. Use them and you'll see the difference...and probably get an answer ?
×

Success!

Help @Inny1807 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...