Skip to main content
๐Ÿ› Bug HuntPH PHP Mediumโšก+20 XP

SQL Injection Risk

This query is vulnerable to SQL injection.

๐Ÿ› Find the bug
1$id = $_GET["id"];
2$sql = "SELECT * FROM users WHERE id = $id";
๐Ÿ› The bug is on line 2

๐Ÿ”ง Select the correct fix: