Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Tell me how do I escape data before storing it into the database?



Tell me how do I escape data before storing it into the database?..

Answer / Avinash Rathi

"To escape data before storing it into a database in PHP, you can use mysqli_real_escape_string() or PDO::quote(). Here is an example using PDO:nn$stmt = $db->prepare("INSERT INTO table (column) VALUES (:escapedData)");n$stmt->bindParam(':escapedData', $escapedData, PDO::PARAM_STR);".

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

how set session expire time in php?

4 Answers  


what is difference between PHP4 , PHP5

1 Answers   Net Solution,


How does csrf token work?

1 Answers  


How do I check environment variables?

1 Answers  


What is the difference between the functions strstr() and stristr()?

1 Answers  


Is multilevel inheritance possible in php?

1 Answers  


How to create and destroy cookies in php?

1 Answers  


Explain Constant in Class?

1 Answers  


What is a persistent cookie in php?

1 Answers  


Why do we use interface in php?

1 Answers  


Is php faster than python?

1 Answers  


How to get the ip address of the client?

1 Answers  


Categories