Can someone help me with this. I'm trying to get ?id= set to the id number
of the name in the database. I can get ?id="THE NAME" but I can't get it
to pick up the id number. here is the code i"m trying:
while($row = mysql_fetch_array($result))
        {

                 printf("<a href=\"%s?id=%s\">%s</a><br>\n", $PHP_SELF,
$row["ID"], $row["Name"], $row["Name"]);
}

If I change the first $row["ID"] to $row["Name"] then ?id="Name here" but
then when I try to extract the information from the database using:

$result = mysql_query("SELECT * FROM Profiles WHERE id=$id", $dbcnx);
$row = mysql_fetch_array($result);

It won't work, but in the address bar if I manually change ?id=1 then the
information will load fine. Can anyone help?
Thanks.
-Chris


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to