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);

?>

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.