I have an app in PHP , I am getting first Name and last Name from several sources, (API's ,files etc)
Suppose I get Name like john'
, john"
, How I can save the name as it is in the Database, the ',"
could be at any place,The problem is that when I write query like
Insert into table values('".$a."');
so If $a contains name John' then the query becomes Insert into table values('John'');
which is wrong,( 2 ' at the end)
How to cater these scenario in PHP?