How to use mysql_real_escape_string in PDO

Actually i am trying to use like this :

$note1 = $_POST[‘note’];
$note=mysql_real_escape_string($note1);

But this is working in Mysqli ( mysqli_real_escape_string ) but not in PDO Show error :

** Fatal error : Call to undefined function mysql_real_escape_string() in E:\xampp\htdocs\darshan\school-uniform-booking-demo-project\admin\payment1.php on line 20**

any suggestion please…!

thank you,

Simple, you dont use it.

if you use prepared and parameterized queries you do not need to escape data before db queries

1 Like

I want to here pass value as some special character

ex: #12/1 abc blore

How to pass if normal special character are not saving

Its Working…

thank you,

Sponsor our Newsletter | Privacy Policy | Terms of Service