I am using addslashes() when I insert data to mysql from a form and then stripslashes when I redisplay it in the browser.
Only problem is when an apostrophe is used. It seems php is adding an additional apostrophe. Is this so it has a set of single quotes or do I need to do something different?
Also, it looks like the information in the database has a single apostrophe.
I added the echo without stripslashes and it produced the double single quote.
But, this time the echo with stripslashes applied produced correct results!
Then, I clicked a different link and came back to the listing and it displayed 4 single qoutes for the unstripped and 2 for the stripped. As I continued to click around it would sometimes display the first set of results then the last set of results.
What's with that?? The php info says magic_quotes_gpc is ON. Does that have some effect on this?