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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program using while loop?

1104


Explain me is it possible to destroy a cookie?

1015


Name and explain five of the PHP error constants?

1022


What is the current stable version of php?

1106


Tell me what kind of things have you done on the social side?

1054


How can we extract string "pcds.co.in" from a string "https://info@pcds.co.in" using regular expression of php? More on reg can you explain

1066


sort term descripttion form, report and uery

2252


List some features of php that are deprecated in php7?

1013


What is trait in php?

1053


What does $_files means?

1151


What is the difference between htmlentities() and htmlspecialchars()?

1079


What sized websites have you worked on in the past?

1075


What is the current stable version of php? What advance thing in php7?

1082


Which variable declarations within a class is invalid in php?

1042


hello all, I need some sample placement papers in lion bridge.. can anyone help me?

2164