heres what i have, a list of members that auto updates when they fill out a form. I want it set so that it lists the members and when you click their name the other information they filled in comes up. i have all this fine with 1 complication, when you click on a name it gives you the info for the first person on the list no matter what.
heres the script i have so far, whats wrong?
<body>
<?php
$db = mysql_connect("venus.powweb.com", "alphasquad", "alphasquad");
mysql_select_db("thugs4life",$db);
// display individual record
if ($id) {
$result = mysql_query("SELECT * FROM alphasquadmembers ORDER BY id",$db);
$myrow = mysql_fetch_array($result);
printf("Alias: %s\n<br>", $myrow["name"]);
printf("E-mail: %s\n<br>", $myrow["email"]);
} else {
$result = mysql_query("SELECT * FROM alphasquadmembers ORDER BY id",$db);
if ($myrow = mysql_fetch_array($result)) {
do {
printf("<a href=\"%s?id=%s\">%s</a><br>\n", $PHP_SELF, $myrow["id"], $myrow["name"]);
} while ($myrow = mysql_fetch_array($result));
} else {
// no records to display
echo "Sorry, no records were found!";
}
}
?>
</body>
the site this is at is http://www.visualx.net/as/php/test.php3