use " to display the data in the input-text element and undo this before inserting it into the database
function quoteToHtml ( $string ) { return str_replace( '"' , '"' , $string ); } function htmlToQuote ( $string ) { return str_replace( '"' , '"' , $string ); }
Only way to go :-)
Scott Fletcher wrote:
I'm using data that goes from the HTML textbox to PHP to MYSQL to PHP to HTML textbox. The only trouble I have is to escape the apostrophe character when it is put into the HTML textbox by PHP (from MySQL).
--snip-- echo "<input type='textbox' value='".$value."'>"; --snip--
I can't use the HTML feature like " or something because the """ would show up in the database... Any suggestion or advice?
Thanks, Scott F.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php