strago Posted January 25, 2012 Share Posted January 25, 2012 I'm going to manually be converting a lot of static text into being in a database and am just wondering what characters I need to add a \ to before the character. Any others along with " and ' Quote Link to comment https://forums.phpfreaks.com/topic/255736-what-characters-do-you-escape/ Share on other sites More sharing options...
kickstart Posted January 25, 2012 Share Posted January 25, 2012 Hi If you are using a php script to upoad the data then just use mysql_real_escape_string If you are doing this directly in mysql then the above link shows you what the mysql_real_escape_string does escape. All the best Keith Quote Link to comment https://forums.phpfreaks.com/topic/255736-what-characters-do-you-escape/#findComment-1310959 Share on other sites More sharing options...
fenway Posted January 25, 2012 Share Posted January 25, 2012 yes, it's always safer to let the DB driver handle quoting for you. Quote Link to comment https://forums.phpfreaks.com/topic/255736-what-characters-do-you-escape/#findComment-1311187 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.