Newbie ?: form mailer not working

From: Date: Tue, 04 Sep 2001 20:26:28 +0000
Subject: Newbie ?: form mailer not working
Groups: php.general 
Request: Send a blank email to php-general+get-65938@lists.php.net to get a copy of this message
Hi all... Having problems with some php3 to php4 stuff.. the site has a form that has been setup to ask questions outside our discussion forums. The form.html contains <FORM action="util/questionmailer.php" method="post"> The questionmailer code is as below. I have only changed the email addy and the file extension from .php3 to .php on the questionmailer file and the .php (above) in the form.html page. I have checked the php on-line manual, but can find nothing that fits my problems or errors. I am getting: 1) Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /usr/home/blah/html/util/questionmailer.php on line 24 2) Parse error: parse error in /usr/home/erc/html/util/questionmailer.php on line 24 Line 24 in my code is: <a href="\%22mailto:webmaster@blah.com\%22"> //questionmailer.php code <body> <?php $mailTo="webmaster@blah.com" ; $mailSubject="Question" ; $mailBody="Name: $name \r\n" ; $mailBody .="Email: $email \r\n" ; $mailBody .="Question: $question \r\n" ; if(mail($mailTo, $mailSubject, $mailBody)) { print("Thank-You, your request has been sent."); } else { print("There was a problem transporting your request, please try again.\n"); print("If the problem persists you can mail your question directly to <address><a href="\%22mailto:webmaster@blah.com\%22"> <p>the forum administrator</a>"); } ?> </p> </body> Is there something I'm missing here? (I am coming from an ASP background, with VB and some C++ knowledge, so it all looks familiar, I am just trying to sort out syntax and think it must be that type of error. I didn't write the original code, just trying to fix it all :) TIA. Michelle

« previous php.general (#65938) next »