RE: [PHP] Newbie ?: form mailer not working

From: Date: Tue, 04 Sep 2001 21:30:05 +0000
Subject: RE: [PHP] Newbie ?: form mailer not working
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-65951@lists.php.net to get a copy of this message
Michelle: This line seems to be a problem. 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>"); Try escaping your quotes surrounding your mailto href. hth Happy programming! Chris Mulcahy > -----Original Message----- > From: Michelle Marcicki [mailto:michelle@tsiworks.com] > Sent: Tuesday, September 04, 2001 3:26 PM > To: PHP List > Subject: [PHP] Newbie ?: form mailer not working > > > 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 (#65951) next »