mysql_real_escape_string($_POST['field'] IN the query
use addslashes
use htmlspecialentities
use str_replace to switch it to an ascii equivalent



From: "Stephen Smith" <[EMAIL PROTECTED]>
To: <>
Subject: [PHP-DB] Using apostrophe's within a text field
Date: Wed, 28 Mar 2007 00:15:03 -0400

OK guys, here is my delima, which is probably very easy to solve, but I can't seem to find it. I am trying to get form fields to accept apostrophes within the input and stop crashing on me. I'm writing forms into a mysql database and everything works great unless the user enters a word like "won't" or "can't". Them it crashes during the form submit. What can I do to fix this stupid thing anyway?

thanks in advance.

Steve Smith


PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to