September 23rd, 2000, 08:11 AM
If I enter text into a field containing an apostrophy ' the script run through ok but doesn't place the data in the table ????? What's the answer to this?
I'm totally clueless here.
September 23rd, 2000, 08:18 AM
Having a single quote in an SQL query will cause an error, they need to be escaped with the backslash character .
you can use addslashes($text) to escape all the quotes, and then use stripslashes($text) to remove the escapes (when you pull it back out of your database).
If you administer PHP yourself, look at magic_quotes in the manual. It automates the escaping, so you don't have to run addslashes() and stripslashes().
Hope that helps.
September 23rd, 2000, 05:05 PM
Oh it helps all right! Thank you very much.