Here's my code:
$result = mysql_query("SELECT * FROM inventory",$db);
if ($myrow = mysql_fetch_array($result)) {
echo "<table border=0>\n";
do
{
echo ("
<tr>
<td height='2' rowspan='5'>
</td>
<td colspan='3' height='2'>
</td>
</tr>
<tr>
<td width='38%' height='17'>
<?php $myrow['Year'];?>
</td>
<td width='22%' height='17'>
<?php $myrow['Miles'];?> Miles
</td>
<td width='22%' height='10' rowspan='3'>
</td>
</tr>
<tr>
<td width='38%' height='19'>
<?php $myrow['Model'];?>
</td>
<td width='22%' height='19'>
<?php $myrow['Price'];?>
</td>
</tr>
<tr>
<td width='38%' height='17'>
<?php $myrow['Exterior_Color'];?> / <?php $myrow['Interior_Color'];?>
</td>
<td width='22%' height='17'>
<?php $myrow['Stock_Number'];?>
</td>
</tr>
<tr>
<td colspan='3' height='2'>
</td>
</tr>\n");
}
while ($myrow = mysql_fetch_array($result));
echo "</table>\n";
}
else
{
echo "None in inventory at this time.";
}
?>
And the errors that I get:
Notice: Undefined index: 'Year' in c:\apache\apache\htdocs\inventory.php on line 31
Notice: Undefined index: 'Miles' in c:\apache\apache\htdocs\inventory.php on line 34
Notice: Undefined index: 'Model' in c:\apache\apache\htdocs\inventory.php on line 41
Notice: Undefined index: 'Price' in c:\apache\apache\htdocs\inventory.php on line 44
Notice: Undefined index: 'Exterior_Color' in c:\apache\apache\htdocs\inventory.php on line 49
Notice: Undefined index: 'Interior_Color' in c:\apache\apache\htdocs\inventory.php on line 49
Notice: Undefined index: 'Stock_Number' in c:\apache\apache\htdocs\inventory.php on line 52
I have a feeling that I'm way off.. I'm a newb so any help would be appreciated. Thanks.