Hi there,
I am learning PHP/MySQL using some tutorials from WebMonkey @ Lycos. However there are a few bugs in their code in which I can't figure out...
PHP:
<html>
<body>
<?php
$db = mysql_connect("localhost", "root");
mysql_select_db("mydb",$db);
$result = mysql_query("SELECT * FROM employees",$db);
if ($myrow = mysql_fetch_array($result)) {
do {
[B]printf("<a href=\ "%s?id=%s\">%s %s</a><br>\n", $PHP_SELF, $myrow["id"], $myrow["first"], $myrow["last"]);[/B]
} while ($myrow = mysql_fetch_array($result));
} else {
echo "Sorry, no records were found!";
}
?>
</body>
</html>
The line that is in bold is the problem, it just comes up with a general error... if you want it then I will post that too!
Thank you in advance,
Chris