single quotes must be proceded by "\" -- use PHP's addslashes function on the field before insert:
field = addslashes(field); see http://www.php.net/manual/en/function.addslashes.php ----- Original Message ----- From: "Tim Thorburn" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, January 08, 2002 10:11 PM Subject: apostrophe's in PHP & MySQL > Hi, > > I've been experiencing some sporadic problems with a few web forms written > in PHP 3.0.16 and MySQL 3.23.31 with text fields (both single lines and > rows). Generally if any of the text in these forms contains an apostrophe > - either nothing is entered into the database, or nothing after the > apostrophe is entered. > > Is there a way around this? Or is this a limitation of my older versions > of PHP and MySQL? > > Thanks > -Tim > > > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php