dvwa updated
This commit is contained in:
parent
8f3c3af4fb
commit
c37af6fc80
84 changed files with 1873 additions and 605 deletions
|
|
@ -6,24 +6,19 @@ if( isset( $_SESSION [ 'id' ] ) ) {
|
|||
|
||||
// Check database
|
||||
$query = "SELECT first_name, last_name FROM users WHERE user_id = '$id' LIMIT 1;";
|
||||
$result = mysql_query( $query ) or die( '<pre>Something went wrong.</pre>' );
|
||||
$result = mysqli_query($GLOBALS["___mysqli_ston"], $query ) or die( '<pre>Something went wrong.</pre>' );
|
||||
|
||||
// Get results
|
||||
$num = mysql_numrows( $result );
|
||||
$i = 0;
|
||||
while( $i < $num ) {
|
||||
while( $row = mysqli_fetch_assoc( $result ) ) {
|
||||
// Get values
|
||||
$first = mysql_result( $result, $i, "first_name" );
|
||||
$last = mysql_result( $result, $i, "last_name" );
|
||||
$first = $row["first_name"];
|
||||
$last = $row["last_name"];
|
||||
|
||||
// Feedback for end user
|
||||
$html .= "<pre>ID: {$id}<br />First name: {$first}<br />Surname: {$last}</pre>";
|
||||
|
||||
// Increase loop count
|
||||
$i++;
|
||||
}
|
||||
|
||||
mysql_close();
|
||||
((is_null($___mysqli_res = mysqli_close($GLOBALS["___mysqli_ston"]))) ? false : $___mysqli_res);
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue