Quotation Marks in <textarea>...</textarea>

From: Date: Tue, 09 Oct 2001 22:04:15 +0000
Subject: Quotation Marks in <textarea>...</textarea>
Groups: php.general 
Request: Send a blank email to php-general+get-70541@lists.php.net to get a copy of this message
Hi... I am having some difficulty with my quotation marks in a textarea HTML tag and processed by a PHP form handling script. It seems that if you enter a string in these tags that is surrounded by quotation marks, then you get a backslash and quotation marks surrounding your string in the output. For example, if I am a user writing a message in a comments section of a form: My dog's name is "Harry". We call him that because he is VERY hairy. And the form stores the above into a variable called $Comments, and I decide to print out the result of this string: print ("$Comments\n"); On the browser screen, I get: My dog's name is \"Harry\". We call him that because he is VERY hairy. As far as I know, PHP is supposed to display quotations in textareas without incident and without the backslashes. Please let me know what I am doing wrong. Thanks, KC

« previous php.general (#70541) next »