•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 397,784 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,429 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 3903 | Replies: 1
![]() |
•
•
Join Date: Apr 2004
Location: England
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
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);
?>
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);
?>
•
•
Join Date: Feb 2003
Location: London, England
Posts: 281
Reputation:
Rep Power: 7
Solved Threads: 6
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.
But... why not just have "Surname: $surname Firstname: $first_name" etc rather than bothering with the dots... otherwise you're wasting resources.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
advertisment blog browser cell competition daniweb email encryption eu eudora firefox gentoo gmail google imap linux microsoft mobile mozilla news onecare open source opinion outlook penelope phishing phones php professional research scam security spam spammers spamming stocks technology thunderbird virus web webmail
- Email problem in php. Plz help me (PHP)
- wierd email problem (Windows NT / 2000 / XP / 2003)
- Learning PHP but problem with script (PHP)
- php mysql problem (PHP)
- PHP + MySQL Problem (PHP)
- PHP Email (PHP)
Other Threads in the PHP Forum
- Previous Thread: BASIC FORM problems...
- Next Thread: Can't see mysql records using php in any browser


Linear Mode