Hi everyone, I still cant figure out why this PHP code gives me this error code when i try to send an email from my form..... Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/webde105/public_html/theform.php on line 26....
Does anybody know what is wrong with my PHP code???
<html>
<body>
<?php
if (isset($_REQUEST['email']))
//if "email" is filled out, send email
{
//send email
$fullname = $_REQUEST['fullname'] ;
$subject = $_REQUEST['subject'] ;
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;
mail( "example@example.com", "From: $email", "Full name: $fullname", "Subject: $subject", "message: $message" );
echo "Thank you for using our mail form";
}
else
//if "email" is not filled out, display the form
{
echo "<form method='post' action='theform.php'>
Full name:
<input type="text" name="fullname" rows="20" />
<br />
Subject:
<input type="text" name="subject" />
<br />
Email address:
<input type="text" name="email" />
<br />
Message:
<textarea name="Message" rows=8 cols=40>
</textarea>
<br />
<div class="submitform"><input type="submit" value="Submit form" />
<br />
</form>";
}
?>
</body>
</html>
Your help is much appreciated, thanks.