<script language="php">
#
# this include file has the passwords and
# database names defined in it
#
require('../sql_passwords.php');
echo "Database Server: :mysql1.100ws.com<br>";
echo "database name:miksup_data<br>";
echo "username <br>";
echo "table counters<br>";
echo "more<blockquote>MySQL 4.1.11-Debian_4sarge5 running on<br>mysql1.100ws.com as<br> miksup_data@ws2.100ws.com</blockquote>";
#
# connect to SQL
#
$link = mysql_connect($z_hardcoded_sqlurl,
$z_hardcoded_database,
$z_hardcoded_password )
or die('Could not connect: ' . mysql_error());
echo 'Connected successfully<br>';
#
# select the database I want to use
#
mysql_select_db($z_hardcoded_database) or die('Could not select database');
echo 'selected database<br>';
$query = 'SELECT name, count FROM `counters` LIMIT 0, 30 ';
echo "\$query=$query<br>";
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
echo "query worked<br>";
echo "<table border=2>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo "\t<tr>\n";
foreach ($line as $col_value) {
echo "\t\t<td>$col_value</td>\n";
}
echo "\t</tr>\n";
}
echo "</table>\n";
// Free resultset
mysql_free_result($result);
// Closing connection
mysql_close($link);
</script>