tai Posted April 25, 2007 Share Posted April 25, 2007 Hi, I was wondering if I can get advise on how to pursue this: I have a db with a various user tables and various fields. I would like to have a user login and see only their specific data. I have seen innumerable login scripts, but I am overwhelmed. I am looking for the simplest solution. Could I create some kind of filter that would look for a field usr and a field pass that would spit out the user record that matched those? Hmm. Any friendly advice? Thanks alot, tai Link to comment https://forums.phpfreaks.com/topic/48705-retreive-user-specific-info-from-mysql-after-login/ Share on other sites More sharing options...
tauchai83 Posted April 25, 2007 Share Posted April 25, 2007 create a USER table. once establish the connection for DB, use this 1 to retrieve the user record. <?php $sql=" SELECT * FROM user WHERE userid='$userid' "; $result=mysql_query($sql); $row=mysql_fetch_array($result, MYSQL_ASSOC); $first_name=$row['first_name']; $last_name=$row['last_name']; $password=$row['password']; echo $first_name; echo $last_name; ?> hope this help. Link to comment https://forums.phpfreaks.com/topic/48705-retreive-user-specific-info-from-mysql-after-login/#findComment-238625 Share on other sites More sharing options...
tai Posted April 25, 2007 Author Share Posted April 25, 2007 Thanks alot! tai Link to comment https://forums.phpfreaks.com/topic/48705-retreive-user-specific-info-from-mysql-after-login/#findComment-238631 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.