I'm struggling a bit figuring out the best way accept and store a url from a web page.
Here's my approach:
It should be urlencoded since it's sent over the net to the server.
Specify the page as utf-8 in the header.
Use my_real_escape_string for inserting to the db.
Use strip_slashes on the input.
Does this make sense?
stripslashesis never the correct tool to use. If you are encountering data that has slashes unexpectedly, then chances are that your server hasmagic_quotesenabled and you should find a competent host ASAP.