What is the best way to avoid \' while we get the values from PHP post method and want to store in the database. I have used simply , echo $_POST['txtname'];
it produces the output Uncl\'es Jules, if enter name as Uncl'es Jules
Can any one suggest the better way?
This sounds like you have magic_quotes enabled that’s why it is escaping data automagically.
magic_quotes. Here is how you canIf magic_quotes is not disabled with any reason you can use stripslashes do remove those extra
\.