Powered By Blogger

Friday, August 9, 2019

use single quotes in mysql query in php OR Escape single quote in sql

<?php
$str 
"O'Reilly?";
eval(
"echo '" addslashes($str) . "';");?>

OR

 $agency_q = addslashes($agency);

$query .= " agency LIKE '%$agency_q%' OR";

No comments:

Post a Comment