HELP Please...I have my database "thatoneteacher" registered with MYSQL...just PHP I don't think can find it..and YES...there are records in the "subject" table... (3)
Warning: mysql_query(): supplied argument is not a valid MySQL-Link
The code
<html>
<body>
<?php
mysql_connect("localhost","subject") or die ("Error connecting with the server. Try again later. Thanks.");
$db="thatoneteacher";
$result = mysql_query("SELECT * FROM subject",$db);
if ($myrow = mysql_fetch_array($result))
{
echo "<table border=1>\n";
echo "<tr><td>Name</td><td>Address</td><td>Home Number</td><td>Work Number</td></tr>\n";
do {
printf("<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>\n", $myrow[id], $myrow[subject]);
}
while ($myrow = mysql_fetch_array($result));
echo "</table>\n";
}
else {
echo "Sorry, no records were found!";
}
?>
Please help!!
thanks!
fitchic77@yahoo.com
</body>
</html>