BleepingComputer.com: PHP Scripting problem! Linking contacts page to my email

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

PHP Scripting problem! Linking contacts page to my email

#1 User is offline   doolz77 

  • New Member
  • Pip
  • Find Topics
  • Group: Members
  • Posts: 10
  • Joined: 04-March 09

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:


------------------------------------------------------------------------------------------

<?php

/* 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
<br><hr><br>
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>
EOD;

$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....
.........................................
</html>
EOD;
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
Doolz77

#2 User is offline   KamakaZ 

  • Senior Member
  • PipPipPipPip
  • Find Topics
  • Group: Members
  • Posts: 557
  • Joined: 26-August 08
  • Gender:Male
  • Location:Victoria

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.
If I am helping you and don't reply in 24 hours please send me a PM

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

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users