dubstar
format c:
- Joined
- 3 Dec 2002
- Messages
- 1,357
so i've been checking out tutorials and i cant figure out whats wrong..
The Form
<form method="post" action="contact.php">
Contact **********
<br />
<input type="text" name="name" value="name" size="33" />
<br />
<input type="text" name="email" value="email" size="33" />
<br />
Mailing list subscription?
<input name="mailinglist" type="checkbox" value="mailinglist" checked />
<br />
<textarea name="message" rows="10" cols="30">message</textarea>
<br />
<input type="submit" value="submit" />
</form>
The PHP Page > Error is on line 27.. "Parse error: parse error, unexpected $ in...." It's where </HTML> is at. I dont understand what i didnt close.
The Form
<form method="post" action="contact.php">
Contact **********
<br />
<input type="text" name="name" value="name" size="33" />
<br />
<input type="text" name="email" value="email" size="33" />
<br />
Mailing list subscription?
<input name="mailinglist" type="checkbox" value="mailinglist" checked />
<br />
<textarea name="message" rows="10" cols="30">message</textarea>
<br />
<input type="submit" value="submit" />
</form>
The PHP Page > Error is on line 27.. "Parse error: parse error, unexpected $ in...." It's where </HTML> is at. I dont understand what i didnt close.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Cellar Door - Long Beach</title>
</head>
<body>
<?
$name = $_REQUEST['name'] ;
$email = $_REQUEST['email'] ;
$mailinglist = $_REQUEST['mailinglist'] ;
$message = $_REQUEST['message'] ;
if (!isset($_REQUEST['email'])) {
header( "Location: /not_sent.html" );
}
elseif (empty($email) || empty($message) ||empty($name)) {
header( "Location: /not_sent.html" );
}
else {
mail( "***@***.com", "***** Website Form",
"$message\n\nDid they subcribe to the mailing list?? $mailinglist\n\n",
"From: $name <$email>" );
header( "Location: /sent.html" );
?>
</body>
</html>