How to drop Mysql injection attacks in PHP?

by barkkathulla 2013-12-07 18:25:45

Using mysqli ,



$qry = $dbConnection->prepare('SELECT * FROM demo WHERE name = ?');
$qry->bind_param('s', $var);

$qry->execute();

$result = $qry->get_result();
while ($row = $result->fetch_assoc()) {
//$row add your functionality
}

918
like
0
dislike
0
mail
flag

You must LOGIN to add comments