Jump to content


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.

Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.


PHP Scripting problem! Linking contacts page to my email

  • Please log in to reply
1 reply to this topic

#1 doolz77


  • Members
  • 10 posts
  • Local time:04:08 AM

Posted 29 June 2009 - 02:24 AM

Hi there

This exact question has come up before from 'cap2587' as I am having the exact same problem:

When someone fills out my contact form and submits it, I get an email, however, none of the information typed in the boxes by the customer appears in the email. I also used tutvid.com tutorials but still does not work.

The php script looks like this:



/* Subject and Email Variables */

$emailSubject = 'Free Consultation!';
$webMaster = 'me@mysite.com';

/* Gathering Data Variables */

$nameField = $_POST['name'];
$emailField = $_POST['email'];
$email2Field = $_POST['email2'];
$phoneField = $_POST['phone'];
$postcodeField = $_POST['postcode'];
$servicesField = $_POST['services'];
$goalsField = $_POST['goals'];
$otherField = $_POST['other'];
$timeframeField = $_POST['timeframe'];
$locationField = $_POST['location'];
$timesField = $_POST['times'];

$body = <<<EOD
Name: $name <br>
Email: $email <br>
Re-enter Email: $email2 <br>
Phone Number: $phone <br>
Postcode: $postcode <br>
Services: $services <br>
Goals: $goals <br>
Other: $other <br>
Timeframe: $timeframe <br>
Location: $location <br>
Times: $times <br>

$headers = "From: $email\r\n";
$headers .= "content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body, $headers);

/* Results rendered as HTML */

$theResults = <<<EOD
<html........blah blah blah....
echo "$theResults";


I have basically created an entire new website myself and all that needs to be done is the contact page - is driving nuts! :-(

Please could someone give me some assistance here? If 'cap2587' reads this, please could you let us know what you did?

Thank you in advance

BC AdBot (Login to Remove)


#2 KamakaZ


  • Members
  • 739 posts
  • Gender:Male
  • Location:Victoria
  • Local time:02:08 PM

Posted 29 June 2009 - 10:31 PM

I will ask you the same thing i asked "cap2587", do you have access to an SMTP server?

as groovicus has stated previously, this code has known problems with it stated in other forums.

There's no place like
There are 10 types of people in the world, those that can read binary, and those who can't.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users