reashlin
03-14-2007, 08:18 PM
hey,
This is my first post here and I can see me being around alot so I would like to say hi...
anyway, for the problem.
I have the following code on a page which should e-mail to my university e-mail account. The code is taken from the uk2.php.net website so im not sure why it dont wanna play.
<?php
// multiple recipients
$to = 'f9096752@bournemouth.ac.uk'
// subject
$subject = "Birthday";
// message
$message = '
<html>
<head>
<title>Birthday Reminders for August</title>
</head>
<body>
<p>Here are the birthdays upcoming in August!</p>
<table>
<tr>
<th>Person</th><th>Day</th><th>Month</th><th>Year</th>
</tr>
<tr>
<td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
</tr>
<tr>
<td>Sally</td><td>17th</td><td>August</td><td>1973</td>
</tr>
</table>
</body>
</html>
';
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Mail it
mail($to, $subject, $message, $headers);
?>
the error i get is
Parse error: parse error, unexpected T_VARIABLE in /home/f9070792/www/email_test/email.php on line 7
I have worked with php for a bit and can't for the life of me work out what the problem on line 7 is...
This is my first post here and I can see me being around alot so I would like to say hi...
anyway, for the problem.
I have the following code on a page which should e-mail to my university e-mail account. The code is taken from the uk2.php.net website so im not sure why it dont wanna play.
<?php
// multiple recipients
$to = 'f9096752@bournemouth.ac.uk'
// subject
$subject = "Birthday";
// message
$message = '
<html>
<head>
<title>Birthday Reminders for August</title>
</head>
<body>
<p>Here are the birthdays upcoming in August!</p>
<table>
<tr>
<th>Person</th><th>Day</th><th>Month</th><th>Year</th>
</tr>
<tr>
<td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
</tr>
<tr>
<td>Sally</td><td>17th</td><td>August</td><td>1973</td>
</tr>
</table>
</body>
</html>
';
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Mail it
mail($to, $subject, $message, $headers);
?>
the error i get is
Parse error: parse error, unexpected T_VARIABLE in /home/f9070792/www/email_test/email.php on line 7
I have worked with php for a bit and can't for the life of me work out what the problem on line 7 is...