Hi, another problem here! I am trying this example, but I keep getting the following error:
Notice: Undefined variable: PHP_SELF in c:\apache\apache\htdocs\test\php\employee4a.php on line 9
Bob Smith
Notice: Undefined variable: PHP_SELF in c:\apache\apache\htdocs\test\php\employee4a.php on line 9
John Roberts
Notice: Undefined variable: PHP_SELF in c:\apache\apache\htdocs\test\php\employee4a.php on line 9
Brad Johnson
Here is the code:
<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 {
printf("<a href=\"%s?id=%s\">%s %s</a><br>\n", $PHP_SELF , $myrow["id"], $myrow["first"], $myrow["last"]);
} while ($myrow = mysql_fetch_array($result));
} else {
echo "Sorry, no records were found!";
}
?>
</body>
</html>
http://hotwired.lycos.com/webmonkey/99/21/index3a_page3.html?tw=programming
Thanks for any help given!