user,$stuff->pass);
// .
// .
// @mysql_select_db($stuff->name) or die("Unable to select database");
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
//
// Connect to the database
$connect = mysql_connect($host,$user,$password);
print '';
print "$table_name Data
";
// Select the database
@mysql_select_db($database) or die("Unable to select database");
$query="select * from $table_name";
// Run the query
$results_id = mysql_query($query);
if($results_id)
{
print '';
print '| ID | PIN | NAME | TYPE | BALANCE | ';
// Get each row of the result
while ($row = mysql_fetch_row($results_id))
{
print ' | ';
// Get each attribute in the row
foreach($row as $attribute)
{
print "| $attribute | ";
}
print '
';
}
}
else
{
// Display the query and the MySQL error message
print "
QUERY FAILED !!!
QUERY = $query
ERROR = ";
die (mysql_error());
}
mysql_close($connect);
?>