I'm using mysql_real_escape_string()
I'm testing it out at the moment, when I apply this to a string and echo it out before it reaches the mysql query to save it into the database, it adds the correct backslashes before " and ' etc, but when these strings are saved into the database, the original string is being stored e.g. o'reilly
When echoing out these strings from the database, o'reilly is obviously being shown.
My question is, should the database be storing for example o\'reilly?
If so, how do I get it to do that? or is what's happening normal?
I'm asking because the o\'reilly is being sent to the mysql query, but why isn't it saving it into the db like this?
Thanks
I'm testing it out at the moment, when I apply this to a string and echo it out before it reaches the mysql query to save it into the database, it adds the correct backslashes before " and ' etc, but when these strings are saved into the database, the original string is being stored e.g. o'reilly
When echoing out these strings from the database, o'reilly is obviously being shown.
My question is, should the database be storing for example o\'reilly?
If so, how do I get it to do that? or is what's happening normal?
I'm asking because the o\'reilly is being sent to the mysql query, but why isn't it saving it into the db like this?
Thanks