I'm trying to make some series of SQLi challenges(specially I want to allow launching shells from the injection by calling the DB with a full privilege user) first allowing the injection to be made easily(e.g.: Try if app is injectable with single-quote . Get the numbers of columns with ORDER BY, etc.) but it's not possible to get the number of columns with ORDER BY. Any advice?
Here's the script:
<?php
$con = mysql_connect("localhost", "fp", "fp") or die("Couldn't connect");
mysql_select_db("practice", $con);
$param = $_GET["id"];
$result = mysql_query("SELECT * FROM users WHERE id='$param' or die(mysql_error());
while($row = mysql_fetch_array($result)){
echo $row['name'];
}
?>