parse error, unexpected T_STRING in /contact.php on line 4
I have a contact form on a yahoo website that I can't get to work. I'm unexperienced with PHP and have some experience with html. Here is the code from the contact.php
<?
$subject="from ".$_GET['your_name'];
$headers= "From: "info@focusadmin.com"; ----this is line 4---
$headers.='Content-type: text/html; charset=iso-8859-1';
mail("angie@focusadmin.com", $subject, "
<html>
<head>
<title>Contact letter</title>
</head>
<body>
<br>
".$_GET['message']."<br>
".$_GET['your_name']."<br>
".$_GET['your_phone']."<br>
".$_GET['your_address']."<br>
</body>
</html>" , $headers);
echo ("Your message was successfully sent!");
?>
<script>
resizeTo(300, 300)
//window.close()
</script>
parse error, unexpected T_STRING in /contact.php on line 4
Moderator: General Moderators
-
highdemanddesign
- Forum Newbie
- Posts: 4
- Joined: Thu Jan 22, 2009 4:15 pm
Re: parse error, unexpected T_STRING in /contact.php on line 4
And here's what you see when you use an editor with syntax highlighting:
Oops. Looks like those quotes are causing a problem.
Code: Select all
<?
$subject="from ".$_GET['your_name'];
$headers= "From: "info@focusadmin.com";
$headers.='Content-type: text/html; charset=iso-8859-1';
Re: parse error, unexpected T_STRING in /contact.php on line 4
Code: Select all
$headers= "From: info@focusadmin.com";-
highdemanddesign
- Forum Newbie
- Posts: 4
- Joined: Thu Jan 22, 2009 4:15 pm
Re: parse error, unexpected T_STRING in /contact.php on line 4
Thanks so much. That helped, I no longer get the error. It says my message was sent successfully. But now I never get the message. Not really sure what to do from here...