...

View Full Version : need to input more than 255 characters using apostrophes as part of text



percept
12-27-2003, 08:05 AM
I need to input more than 255 characters into mysql and so I use the data type text. But if this text input has an apostrophe in it, this stops the input as it acts as a stop to the insert. How does one allow persons to input large amounts of text and use apostrophes without having to worry about inserting back slashes every time one appears?

Using several books to learn PHP and MySQL I've managed to build a database and perform many different searches successfully but I can't seem to figure out this hopefully "simple" thing.

me'
12-27-2003, 12:10 PM
addslashes() (http://www.php.net/manual/en/function.addslashes.php) maybe?

bcarl314
12-27-2003, 07:26 PM
Or htmlentities() ???

percept
12-27-2003, 10:29 PM
Thank you me' and bcarl314 for these suggestions... I have briefly read over these 2 functions and they both make sense. I'm sure I will now be able to accomplish what I need due to your suggestions so thank you for saving me leaps of time... happy holidays!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum