My Mailing List form doesn't work, I got this error...
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/content/s/w/e/sweb09/html/mailinglist.php on line 8
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/content/s/w/e/sweb09/html/mailinglist.php on line 9
Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE or '$' in /home/content/s/w/e/sweb09/html/mailinglist.php on line 9
Here's the code I used for the mailing list form...
<form method="post" action="http://www.sdesignsstore.com/mailinglist.php">
<input name="message" type="text" value="Enter email address" />
<input type="submit" value="send" />
</form>
I uploaded the php file in the root directory of the site, here's the code for mailinglist.php...
<?
$to="xporcellx@gmail.com";
$subject="Contact From Your Website";
$message=$_REQUEST[message];
mail($to,$subject,$message);
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Message Sent</title>
</head>
<body>
Thank you... Your message has been sent.
</body>
</html>
What am I doing wrong? Thanks!
Need HELP with contact and mailing list forms FAST!!!!!
Moderator: General Moderators
-
likegluelikecrew
- Forum Newbie
- Posts: 1
- Joined: Mon Jan 18, 2010 9:22 pm
Re: Need HELP with contact and mailing list forms FAST!!!!!
i don't think that's all your code for mailinglist.php.
either way, try prining out the results of your $_POST array. Dunno why you're using $_REQUEST. I realize it can be both, but your form is a POST form, so not sure what you're trying to achieve. Anyways, I'd check your Message data. you're propbably passing some characters that need to be sanitzed before you can send the email.
either way, try prining out the results of your $_POST array. Dunno why you're using $_REQUEST. I realize it can be both, but your form is a POST form, so not sure what you're trying to achieve. Anyways, I'd check your Message data. you're propbably passing some characters that need to be sanitzed before you can send the email.
- Jonah Bron
- DevNet Master
- Posts: 2764
- Joined: Thu Mar 15, 2007 6:28 pm
- Location: Redding, California