Re: Quotes """ in form textarea fields

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux