nwilson92 Posted October 24, 2014 Share Posted October 24, 2014 Hi, I recently bought a HTML template and it came with a contact form which work fines. The only issue I have is that when the email arrives it only shows the persons first name, not their surname unless the name is kept as one e.g.. Adam-Smith I can't see why this is and has been bugging me for the past couple of days! Any ideas? $email_to = "contact@website";$name = $_POST["user-name"];$email = $_POST["user-email"];$message = $_POST["user-message"];$text = "Name: $nameEmail: $emailMessage: $message";$headers = "MIME-Version: 1.0" . "\r\n";$headers .= "Content-type:text/html; charset=utf-8" . "\r\n";$headers .= "From: <$name>" . "\r\n";mail($email_to, "Contact", $text, $headers);?> Thanks Quote Link to comment https://forums.phpfreaks.com/topic/292044-contact-form/ Share on other sites More sharing options...
Gaab Posted October 29, 2014 Share Posted October 29, 2014 Hey, Can you give me the Code of the Input Boxes? Quote Link to comment https://forums.phpfreaks.com/topic/292044-contact-form/#findComment-1495151 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.