This one look and sound good.  I'll give this a shot.  Thanks a million....

Scott F.

"John W. Holmes" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Red Wingate wrote:
>
> > use &quot; to display the data in the input-text element and undo this
> > before inserting it into the database
> >
> > function quoteToHtml ( $string ) {
> >   return str_replace( '"' , '&quot;' , $string );
> > }
> > function htmlToQuote ( $string ) {
> >   return str_replace( '&quot;' , '"' , $string );
> > }
> >
> > Only way to go :-)
>
> You don't need to "undo" anything in the data submitted from the form.
> This is done automatically. Try it. It's the same as how URL values are
> decoded automatically.
>
> Also, instead of str_replace, you can use
> htmlentities($string,ENT_QUOTES), which will convert single and double
> quotes (among other characters) just in case you end up using either one
> in your HTML.
>
> -- 
> ---John Holmes...
>
> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
>
> php|architect: The Magazine for PHP Professionals – www.phparch.com

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

Reply via email to