https://code-projects.org/online-book-shop-using-php-source-code/
/subcat.php - $cat
paremeter.
The SQL Injection vulnerability exists in diretory /subcat.php
where this function query the cat parameter into the SQL statement without any restriction, validation or sanitization. An attacker could exploit this vulnerability to get unauthorized access to the server database, or even perform Remote Code Execution (RCE).
require('includes/config.php');
session_start();
$cat=$_GET['cat_nm'];
$q = "select * from subcat where parent_id = ".$_GET['cat'];
$res = mysqli_query($conn,$q) or die("Can't Execute Query..");
$row1 = mysqli_fetch_assoc($res);
if($_GET['catnm']==$row1['subcat_nm'])
{
header("location:booklist.php?subcatid=".$row1['subcat_id']."&subcatnm=".$row1["subcat_nm"]);
}
?>