Re: Quotes """ in form textarea fields

From: Date: Fri, 08 Oct 2004 14:07:50 +0000
Subject: Re: Quotes """ in form textarea fields
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-198961@lists.php.net to get a copy of this message
Sam Smith wrote:
I swear I googled for an hour first. A user enters in a textarea field of FORM1.php: Bob is "high" Submitted to FROM2.php we get: Bob is \"high\" In a hidden field in FROM2.php we store the value: <type="hidden", value="<? echo stripslashes($_POST['textarea']); ?>> Value now Bob is "high"
So it looks: <input type="hidden" value="Bob is "high"> (hope this is what you meant) You forgot ending quote, but that does not matter now. You need to convert quotes and other special html chars to their html entities, using htmlentities() function

« previous php.general (#198961) next »