Skip to content

Instantly share code, notes, and snippets.

@pborreli
Created September 23, 2010 11:47
Show Gist options
  • Save pborreli/593499 to your computer and use it in GitHub Desktop.
Save pborreli/593499 to your computer and use it in GitHub Desktop.
<?php
mysql_connect('localhost', 'root', '') or
die('cannot connect : ' . mysql_error());
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<style type="text/css">
body { font-family: arial, helvetica, sans-serif; font-size: 10pt; margin: 0; }
table { border-collapse: collapse; margin: auto; }
tr { background-color: #99c }
td { border: 1px solid #000; background-color: #ccc; }
.key { background-color: #ccf }
</style>
<title>mysqlinfo()</title></head>
<body>
<table>
<?php
$result = mysql_query('SHOW VARIABLES');
while ($row = mysql_fetch_array($result, MYSQL_NUM)) :?>
<tr><td class="key"><?php echo $row[0] ?></td><td><?php echo $row[1] ?></td></tr>
<?php endwhile; ?>
</table>
<?php mysql_free_result($result); ?>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment