Hi Everyone
I just picked up a PHP book and have been going through it and trying to learn. When I tried this php script that the book had with a little of my own editing I got the following parse error:
Parse error: parse error, unexpected T_STRING in /home/.instructor/test.php on line 17
Heres my code:
Line 17 is where the: mail ( function is called
Hopefully someone can point out what i'm doing wrong
Thanks!
I just picked up a PHP book and have been going through it and trying to learn. When I tried this php script that the book had with a little of my own editing I got the following parse error:
Parse error: parse error, unexpected T_STRING in /home/.instructor/test.php on line 17
Heres my code:
Code:
<?php # Script 3.12 - register.php
$page_title = 'Test!';
if (isset($_POST['submit'])) {
if (strlen($_POST['email']) > 0) {
$email = TRUE;
} else {
$email = FALSE;
echo '<p> you forgot to enter your email! </p>';
}
if ($email) {
mail ('bleh@gmail.com', 'New Email Request', 'Heres the email: ($_POST['email'])' );
echo '<p> Thank you for registering your email Address! </p>';
}
else {
echo '<p> Please go back and try again</p>'
}
}
else
{
?>
<form action="<?php echo $_Server['PHP_SELF']; ?>" method="post">
<fieldset>
<p><b>Email:</b> <input type="text" name="email" size="40" maxlength="60" /></p>
</fieldset>
<div align="center><input type="submit" name="submit" value="Submit Information" /></div>
</form>
}
Line 17 is where the: mail ( function is called
Hopefully someone can point out what i'm doing wrong
Thanks!