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
Write a program using while loop?
Explain me is it possible to destroy a cookie?
Name and explain five of the PHP error constants?
What is the current stable version of php?
Tell me what kind of things have you done on the social side?
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
sort term descripttion form, report and uery
List some features of php that are deprecated in php7?
What is trait in php?
What does $_files means?
What is the difference between htmlentities() and htmlspecialchars()?
What sized websites have you worked on in the past?
What is the current stable version of php? What advance thing in php7?
Which variable declarations within a class is invalid in php?
hello all, I need some sample placement papers in lion bridge.. can anyone help me?