Re: Why???

From: Date: Thu, 15 Feb 2001 04:52:27 +0000
Subject: Re: Why???
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-39821@lists.php.net to get a copy of this message
just use <? $topic=stripslashes($topic); $to = "xxxxxxx@xo.com"; $subject = "Update"; $message = "The following Webpage is added or updated:\n\nDate: $date\nEquipment : $equipment\nTopic: $topic\nURL: $url"; $mail_header = "From: $email"; mail( $to, $subject, $message, $mail_header ) or print "Could not send mail"; print ("<HTML>\n"); print ("<HEAD>\n"); print ("<TITLE>$title</TITLE>\n"); print ("</HEAD>\n"); print ("<BODY BACKGROUND=\"images/bkgrnd.jpg\" bgcolor=\"#FFFFFF\">\n"); print ("<H3>Thank you. Your submission has been sent. <br><br><A HREF=\"index.h tml\">Back</A> to Home Page.\n"); print ("</BODY>\n"); print ("</HTML>"); ?> hope that helps best regards Ankur Verma HCL Technologies A1CD, Sec -16 Noida, UP India ----- Original Message ----- From: "Nguyen, David M" <david.m.nguyen@xo.com> To: <php-general@lists.php.net> Sent: Wednesday, February 14, 2001 9:58 PM Subject: RE: [PHP] Why??? > The / is coming from $topic, how do I use stripslashes to remove / . Can > someone give me an example how to code it? > > Here is my original PHP script: > > <? > > $to = "xxxxxxx@xo.com"; > $subject = "Update"; > $message = "The following Webpage is added or updated:\n\nDate: > $date\nEquipment > : $equipment\nTopic: $topic\nURL: $url"; > $mail_header = "From: $email"; > mail( $to, $subject, $message, $mail_header ) or print "Could not send > mail"; > > print ("<HTML>\n"); > print ("<HEAD>\n"); > print ("<TITLE>$title</TITLE>\n"); > print ("</HEAD>\n"); > print ("<BODY BACKGROUND=\"images/bkgrnd.jpg\" > bgcolor=\"#FFFFFF\">\n"); > print ("<H3>Thank you. Your submission has been sent. <br><br><A > HREF=\"index.h > tml\">Back</A> to Home Page.\n"); > print ("</BODY>\n"); > print ("</HTML>"); > > ========================================================== > > > > -----Original Message----- > From: John Vanderbeck [mailto:agathorn@cfl.rr.com] > Sent: Wednesday, February 14, 2001 10:07 AM > To: Nguyen, David M; php-general@lists.php.net > Subject: Re: [PHP] Why??? > > > I can help you there, as I had the same problem until someone else helped > me. This is because PHP will escape the input it gets. I think this is > dependant on some enviroment setting, but I can't recall which one. > > To fix it you call stripslashes($var); > > - John Vanderbeck > - Admin, GameDesign > > ----- Original Message ----- > From: "Nguyen, David M" <david.m.nguyen@xo.com> > To: <php-general@lists.php.net> > Sent: Wednesday, February 14, 2001 11:02 AM > Subject: [PHP] Why??? > > > > Hi all, > > > > I have a PHP web form setup for user to fill in information then email it > to > > me after pressing SUBMIT button. Everytime user uses double-quote(") or > > single(') it inserts (/) right in front of " or '. Does anyone know why > and > > how to fix it? Please advise. Below is example of what I got from my > email > > when user submits form to me. > > > > > > Topic: Added \"Initial login to the EMS\" procedure. > > > > > > Thanks in advance, > > David > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#39821) next »