Page 1 of 1

Need HELP with contact and mailing list forms FAST!!!!!

Posted: Mon Jan 18, 2010 9:28 pm
by likegluelikecrew
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!

Re: Need HELP with contact and mailing list forms FAST!!!!!

Posted: Mon Jan 18, 2010 10:15 pm
by infolock
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.

Posted: Tue Jan 19, 2010 11:13 am
by Jonah Bron
Take a careful look at lines 8 and nine. If you can't see a problem, post them here.