mail from a web site
Posted: Fri Jan 15, 2010 6:37 am
Hi Guys im trying (my hardest) to implement a php email submit form on a web site i am setting up.
the we site is currently available here
http://gator1123.hostgator.com/~dunryc/
when i click the submit button i get the following error
Can any please give me a heads up before i pull my hair out ?
sorry code is below
the we site is currently available here
http://gator1123.hostgator.com/~dunryc/
when i click the submit button i get the following error
I believe from reading up on the web this is usually due to not finishing a line with a semi colon or forgetting to close a bracket somewhere !!Parse error: syntax error, unexpected T_STRING in /home/dunryc/public_html/mail.php on line 25
Can any please give me a heads up before i pull my hair out ?
sorry code is below
<?php
{
$from = $_POST["from"]; //get the name of the person
$email = $_POST["email"]; //gets the email address
$loan_amount = $_POST["loan_amount"]; //get their loan amount
$purpose = $_POST["purpose"]; //get the loan purpose
$title = $_POST["title"]; //gets the title
$first_name = $_POST["first_name"]; //get the forname
$surname = $_POST["surname"]; //get the surname
$postcode = $_POST["postcode"]; //get the postcode
$house_number = $_POST["house_number"]; //get the house number
$street = $_POST["street"]; //get the street
$town = $_POST["town"]; //get the town
$homeowner = $_POST["homeowner"]; //get the house status
$home_phone = $_POST["home_phone"]; //get the home phone number
$mobile = $_POST["mobile"]; //get the mobile phone numer
$work_number = $_POST["work_number"]; //get the work number
$email = $_POST["email"]; //get the email address
$content = "Loan application, $loan_amount, \r\n $purpose, \r\n $title, \r\n $first_name, \r\n $surname, \r\n $postcode, \r\n $house_number, \r\n $street, \r\n $town, \r\n $homeowner, \r\n $home_phone, \r\n $mobile, \r\n $work_number, \r\n $email"; //little intro of your email message that you will see in your inbox
//$content = $content . $_POST["content"]; //concatenates the intro with the real content
$content = wordwrap($content, 70); //message must be no longer than 70 characters per line (PHP rule), so we wrap it
mail('removedforbots@gmail.com', 'Web app from http://www.rhino-loans.co.uk, $content); //first argument = your email address; second argument = subject of email (make it very catchy so you won't miss it); //third argument = the content (DO NOT CHANGE THIS!!)
$url = "thank_you.html";
$temp = file_get_contents($url);
echo $temp;
}
?>