how can I protect this code from sql injection?
$sql = "SELECT ID FROM newidea WHERE tag LIKE '%" . $arrayuser[$i] . "%' AND ID > $number";
$result = $conn->query($sql);
if(mysqli_num_rows($result))
$row = $result->fetch_assoc();
how can I protect this code from sql injection?
$sql = "SELECT ID FROM newidea WHERE tag LIKE '%" . $arrayuser[$i] . "%' AND ID > $number";
$result = $conn->query($sql);
if(mysqli_num_rows($result))
$row = $result->fetch_assoc();