How to handle apostrophe i.e single quote while inserting to database |
[eluser]Musaddiq Khan[/eluser]
AOA, I want to save "Toyo'" in database. It works fine while inserting to database. But the problem is when I fetch the data and want to use in javascript it create problem. The code is below. Code: $(".order_detail").append('<div id="order_info_'+counter+'" class="order_info">
[eluser]Sanjay Sarvaiya[/eluser]
after fetching data add bellowed syntax that will fix your problem. Code: addslashes("toyo'"); for more information visit http://www.php.net/manual/en/function.addslashes.php
|
Welcome Guest, Not a member yet? Register Sign In |