Skip to content

Latest commit

 

History

History
18 lines (16 loc) · 428 Bytes

challenge-20.md

File metadata and controls

18 lines (16 loc) · 428 Bytes

Challenge

<?php
$link = mysqli_connect('localhost', 'root', 'root');
mysqli_select_db($link, 'code');

$table = addslashes($_GET['table']);
$sql = "UPDATE `{$table}` 
        SET `username`='admin'
        WHERE id=1";
if(!mysqli_query($link, $sql)) {
    echo(mysqli_error($link));
}
mysqli_close($link);

Refference