Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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