Hi all,
I don't know what's going on, but when I use the following code, I'm getting an extra row on top of the table .... I've been staring at it forever and just can't see the mistake. Can somebody please give me a hand?
Note - I wrote parts of the code and Dreamweaver MX wrote the other part. The one who pays my paycheck thought that one up. 🙂
I'm afraid I can't show an example as I'm working locally and don't have a useful place to upload the whole database and such to.
<?php require_once('../../../../Connections/DB_tests.php'); ?>
<?php
mysql_select_db($database_DB_tests, $DB_tests);
$sql = "SHOW TABLES LIKE 'list%'";
$result = mysql_query($sql);
if (!$result) {
echo "DB Error, could not list tables\n";
echo 'MySQL Error: ' . mysql_error();
exit;
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
<table border="0" cellpadding="3">
<?php do { ?>
<tr>
<td><?php echo "{$row[0]}"; ?></td>
<td>[ <a href="db_table_edit.php?tablename=<?php echo"{$row[0]}";?>" >Edit</a> ] [ <a href="../../db_table_delete.php?tablename=<?php echo"{$row[0]}";?>" >Delete</a> ] </td>
</tr>
<?php } while ($row = mysql_fetch_row($result)); ?>
</table>
</body>
</html>
Thanks in advance!