Hi, I've created a user-login-system web site and have a problem to retrieve data in a folder that user is getting there from the other page (not from login form). How can I retrieve the user ID from table USERS. I use these codes, but it doesn't work. $ID = $_GET['ID']; $data = mysql_query("SELECT * FROM USERS WHERE ID = '$ID' ") or die(mysql_error()); $info = mysql_fetch_array( $data ); Thanks for your help in advance.
Hi, try $info['ID'] btw why you need this from DB when it is WHERE ID = $ID -> searched ID is $_GET['ID'] Regards, Nick
Thanks for response, I'll need this because I want the user to do the update things on their profile page. With the codes above I get Notice: unidentified ID. It retrieves only information of people on the first row of the USERS table. I'm at my wit end to solve this. Thanks
Hi ketting00, Please note that table and field names are case sensitive on *nix systems, so TableName != tablename, ID != id and s.o. (if MySQL runs on Windows, they are the same). Also you can get first field by $info[0],second $info[1]...: $info = mysql_fetch_array( $data ); echo $info[0]; Code (markup): Regards, Nick