I'm going to kick myself when I finally get this. I did just as you said. I even did it when you said it on friday and i'm still getting this error.
Is there any logical reason that is shouldn't work. The error is near --- while($row = mysql_fetch_array($query))
//<?php
$db = mysql_connect()
or die ("Could not connect");
mysql_select_db("udllabs")
or die ("Could not select database");
$letter = split("-", $alpha);
$query = mysql_query("SELECT * FROM products WHERE substr(product_description, 0, 1) >= '$letter[0]' AND substr(product_description, 0, 1) <= '$letter[1]'");
$letter[0]; // first letter (a)
$letter[1]; // second letter (d)
echo "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n";
echo "<tr>\n";
echo "<td style=\"background-color: #000;\"><table cellpadding=\"2\" cellspacing=\"1\" border=\"0\">\n";
echo "<tr>\n";
echo "<th>NDC#</th>\n";
echo "<th>Product Description</th>\n";
echo "<th>Package Size</th>\n";
echo "<th>Compare To</th>\n";
echo "</tr>\n";
{
while($row = mysql_fetch_array($query))
echo $row [ printf("
<tr valign=\"top\">\n
<td class=\"data\" nowrap>%s</td>\n
<td class=\"data\">%s</td>\n
<td class=\"data\">%s</td>\n
<td class=\"data\">%s</td>\n
</tr>\n", $row["ndc"], $row["product_description"], $row["size"], $row["compare"])];
}
echo "</table>\n";
//?>