Date: 2021-08-04 17:39:25, Hit: 241
//create database sqlinject;
//use sqlinject;

create table admin(
id int auto_increment primary key,
username varchar(32) not null,
password varchar(32) not null
);

insert into admin (username,password) values ('admin',md5('admin')),('safe',md5('12345')),('test',md5('test'));
<?php
$db_host = '127.0.0.1';
$db_user = 'test';
$db_pass = 'test';
$db_name = 'test';
$id = $_REQUEST['id'];
 
$conn = mysqli_connect($db_host, $db_user, $db_pass) or die("DB Connect Error:" . mysqli_error());
mysqli_select_db($conn,$db_name) or die("Can\'t use sqlinject:" . mysqli_error());
$sql = "SELECT * FROM admin WHERE id=$id";
$query = mysqli_query($conn,$sql) or die("Invalid Query:" . mysqli_error());
while ($row = mysqli_fetch_array($query))
{
    echo "Id:" . $row['id'] . "<br>";
    echo "Name:" . $row['username'] . "<br>";
    echo "Password:" . $row['password'] . "<br>";
} 
mysqli_close($link);
 
echo "Query : ".$sql."<br>";
?>
Edit Delete
License by Moony