Google News
logo
PHP - Interview Questions
What is the use of mysqli_real_escape_string() function?
mysqli_real_escape_string() function is used to escape special characters from the string for using a SQL statement
 
Example :
$DBconnection=mysqli_connect("localhost","username","password","dbname");
$productName = mysqli_real_escape_string($con, $_POST['proname']);
$ProductType = mysqli_real_escape_string($con, $_POST['protype']);
Advertisement