PHP html table


<?php
include 'mysql-connect.php';
mysql_select_db('wvvwme_tumstat');
if (!$dbcon)
  {
  die('Could not connect: ' . mysql_error());
  }
$SQL = "SELECT * FROM data";
$result = mysql_query($SQL);

while ($db_field = mysql_fetch_assoc($result)) {
#print $db_field['url'] . "<BR>";
#print $db_field['description'] . "<BR>";
}
?>
<html>
<head>
<title>Tumstats</title>
</head>
<body>
<table border="1">
<tr>
<td>ID</td>
<td>URL</td>
<td>Description</td>
</tr>
<tr>
<td>row 2, cell 1</td>
<td>row 2, cell 2</td>
</tr>
</table>

Is there a way I can make this


#print $db_field['url'] . "<BR>";
#print $db_field['description'] . "<BR>";

print the data to the table in here.


<td>row 2, cell 1</td>
<td>row 2, cell 2</td>

Try:


<html>
<head>
<title>Tumstats</title>
</head>
<body>
<table border="1">
<?php
include 'mysql-connect.php';
mysql_select_db('wvvwme_tumstat');
if (!$dbcon)
  {
  die('Could not connect: ' . mysql_error());
  }
$SQL = "SELECT * FROM data";
$result = mysql_query($SQL);
 
while ($db_field = mysql_fetch_assoc($result)) {
echo '<tr><td>ID</td>';
echo '<td>'. $db_field['url'] . '</td>';
echo '<td>'. $db_field['description'] .'</td></tr>';
}
?>
</table>

Yeah, thanks I figured that as soon as I posted.
I also changed my mind I’m now going to use this instead.


<?php
include 'mysql-connect.php';
mysql_select_db('wvvwme_tumstat');
if (!$dbcon)
  {
  die('Could not connect: ' . mysql_error());
  }
$SQL = "SELECT * FROM data";
$result = mysql_query($SQL);

while ($db_field = mysql_fetch_assoc($result)) {
print $db_field['url']." - ".$db_field['description']."</br>";
}

include 'insert.php';
?>