Page 1 of 1

Creating ID's

Posted: Wed May 26, 2004 8:29 pm
by sk8erh4x0r
I'm trying to set up ID's for each user on my website. I want it to show as something like .../userinfo.php?ID=user_here

Can someone hook me up with the code for this? I want it to set an ID automatically after someone submits a registratoin form and creates a username for my webpage. Any help would be appreciated. Thanks. :)

Posted: Wed May 26, 2004 8:34 pm
by feyd
please don't cross post.

viewtopic.php?t=22117

Posted: Wed May 26, 2004 8:34 pm
by kettle_drum
Get the id value from the url, use it in a database query and print the results:

Code: Select all

$result = mysql_query("SELECT * FROM users WHERE id = '".$_GET['id']."'");
   $row = mysql_fetch_assoc($result);
   echo "User: ".$row['username']." <br>Date Joined: ".$row['date_joined'];

Posted: Wed May 26, 2004 8:37 pm
by jason
Do not cross post.