I am moving my website from one server to another which is hosted by the same company. On the orginal server the following query worked fine:
$db = mysql_connect("localhost", "user", "pass");
mysql_select_db("database name", $db);
$a = mysql_query("SELECT id, number, name FROM headings ORDER BY number", $db);
while ($myrow = mysql_fetch_row($a)); (this is line 15)
{printf ("<A HREF = \"DisplayProducts.php?x=%s\">%s</A><P>\n", $myrow[0], $myrow[2]);}
When uploaded to new server it says not a valid resource result on line 15. I changed mysql_fetch to mysql_query and I can at least see the header on the page but I can not see the links to the product pages which is what this code did on the old server. What am I missing?
Thanks in advance for the help