943,771 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 5975
  • PHP RSS
Apr 27th, 2004
0

PHP email problem

Expand Post »
Hello, Im trying to send an email which will send information from a enquiry form. but everytime i fill in the details and press send this error comes up:

Parse error: parse error, unexpected T_VARIABLE on line 5
have i done this wrong?

<?php

$to = "thomashumphrey@hotmail.com";
$re = "Enquiry Form";
$msg = "Surname: " $surname,
"Firstname: " $first_name,
"Address: " $address,
"Country: " $country,
"Phone: " $phone_home,
"Fax: " $fax,
"E-mail: " $email,
"Hectares: "$hectares,
"Tonnage: "$tonnage,
"Specific model: "$specific;

mail($to,$re,$msg);

?>
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
tom.hum3 is offline Offline
1 posts
since Apr 2004
Apr 28th, 2004
0

Re: PHP email problem

You've missed out a dot between the "surname" and the $surname.

But... why not just have "Surname: $surname Firstname: $first_name" etc rather than bothering with the dots... otherwise you're wasting resources.
Team Colleague
Reputation Points: 63
Solved Threads: 6
Supreme Evil Overlord
Roberdin is offline Offline
282 posts
since Feb 2003

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: BASIC FORM problems...
Next Thread in PHP Forum Timeline: Can't see mysql records using php in any browser





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC