Hello! The answer to this may be blatantly obvious, but I've only been working with PHP for a couple of weeks now, so bear with me!
I intend to have a memberlist containing a list of members along with a link to each members profile page.
"...profile.php?userID=1"
"...profile.php?userID=2"
...etc.
When the link is clicked the userID string in the url is converted to a variable which helps me to call that users information from the 'users' table in my database.
Here is an example of my script (after connecting to db).
...............................
$result=mysql_query("SELECT * FROM users WHERE userID='$userID'", $db);
$username=mysql_result($result,"username");
$fname=mysql_result($result,"fname");
$lname=mysql_result($result,"lname");
$bio=mysql_result($result,"bio");
$avatar=mysql_result($result,"avatar");
?>
................................
When I try to print a variable, though, regardless of which variable I use, it always outputs the userID number.
What is my script missing? I hope my error is obvious to someone!
Thanks!!!!
Jamie