Tell me what is the use of mysql_real_escape_string() function?



Tell me what is the use of mysql_real_escape_string() function?..

Answer / Pankaj Kumar Sharma

"The mysql_real_escape_string() function in PHP is used to escape special characters that could potentially be malicious, such as single quotes ('), double quotes ("), backslashes (), and NULL values. This helps prevent SQL injection attacks by properly encoding the data before it's inserted into a database."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

Explain me differences between get and post methods?

1 Answers  


What are the different data types in javascript?

2 Answers  


Write a php code which could be used to generate random numbers between 1 - 100 and display them on the screen.

7 Answers  


What is the use of $_server["php_self"] variable?

1 Answers  


Tell me how can we check the value of a given variable is alphanumeric?

1 Answers  


hi, i am new for php I want to know where to create & how to run phpscript programme in LAMP?

2 Answers  


What are the differences between GET and POST methods?

1 Answers  


Tell us how can we display the output directly to the browser?

1 Answers  


What are php data types?

1 Answers  


programm for factorial

1 Answers  


Write a program to show the joining of two strings in php?

1 Answers  


What is Apache's configuration file typically called?

1 Answers  


Categories