--- Gordon Stewart <[EMAIL PROTECTED]> wrote:

> I've fund my error
> 
> It was trying to update my 'subject' field =- & sometimes it contains
> their own quote marks.
> 
> Ive added a preg_replace - to swap quote marks with # marks.
> 
> (i'll to another preg replace - when Im 'reading' the field)

There are functions in PHP which are designed to protect single quotes for
insertion into MySQL.  I typically use addslashes() but the manual recommends
mysql_real_escape_string().  Either would solve your problem here.

James



Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/php-list/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to