How do I display a table

Proximity

IDK?
Feb 13, 2014
673
56
How can I grab the contents of a database table and display it on the page?

Like SELECT look FROM users WHERE username = '" . filter( $_GET['username'] ) . "'" ) or die( mysql_error() and than display the look
 

Proximity

IDK?
Feb 13, 2014
673
56
If I wanted to use this script
Code:
<?php
$data = new mysqli('localhost', 'root', '', '');
if ($data->connect_error) { die("Connection failed: " . $data->connect_error); }
$username = $data->real_escape_string($_GET['username']);
$exe = $data->query("SELECT look FROM users WHERE username = '$username'");
if ($exe->num_rows > 0) {
  while($row = $exe->fetch_assoc()) {
    print "<img src=\"http://habbo.nl/habbo-imaging/avatarimage?figure={$row['look']}&amp;direction=3&amp;head_direction=3&amp;action=wav&amp;size=s\">";
  }
} else {
  echo 'Username not found';
}
$data->close();
?>
Would I do <img src=" ">
 

Users who are viewing this thread

Top