Chikwado Posted September 3, 2015 Share Posted September 3, 2015 (edited) Can some one help explain more, how to retrive specific user profile. That is if I have 10 user and may be 10 of them are currently online. Then each person would only see his or her own profile not others profile. Currently i have a signup page with 6 field, example: 1. Image. 2. Firstname, 3. Lastname, 4. Email, 5. Phone number, 6. Gender. Some one help. Edited September 3, 2015 by Chikwado Link to comment Share on other sites More sharing options...
justsomeguy Posted September 3, 2015 Share Posted September 3, 2015 If someone is logged in then hopefully you're using the session to keep track of who they are, so if you store their unique ID in the session then you can use that to look up their record in the database and display it. Link to comment Share on other sites More sharing options...
davej Posted September 4, 2015 Share Posted September 4, 2015 It isn't clear what you are asking. Do you have a working log-in scheme? Normally when a user attempts to log-in you search the database for their user-id and then check their password (although actually this is a simplification). If the log-in is successful then you can read any other desired profile information from the database and load it into session variables. Normally at a minimum the user-id, display-name, and privilege-level are going to be stored in session variables. http://www.w3schools.com/php/php_sessions.asp In your case perhaps you would set these session variables when the user signs in. Link to comment Share on other sites More sharing options...
Chikwado Posted September 4, 2015 Author Share Posted September 4, 2015 (edited) My question were not clear, How To login Specific user profile? not retrive user profile. I have seen some example. Thank you. Edited September 4, 2015 by Chikwado Link to comment Share on other sites More sharing options...
justsomeguy Posted September 4, 2015 Share Posted September 4, 2015 If someone enters their username and password then you look up their database record to make sure the password matches, and then you store their user ID in the session. Link to comment Share on other sites More sharing options...
Chikwado Posted September 4, 2015 Author Share Posted September 4, 2015 Dear moderator, One more question please, I have read on forum network 10 people voted up 10 people voted down. Some people said to insert image in user profile you should upload it to table. Other said to insert image in a user profile is simple create image folder in public_html and specify the path in table field. While retrive the path the image will display on profile, How is the right way to do it? Link to comment Share on other sites More sharing options...
justsomeguy Posted September 4, 2015 Share Posted September 4, 2015 I prefer to store images on disk and just have the filename in the table. Link to comment Share on other sites More sharing options...
davej Posted September 4, 2015 Share Posted September 4, 2015 To me bloating a database with images only makes sense if the images are small and you want the convenience of knowing that all of your data is in the database, or if there is a security requirement and you want/need the images to be protected equally as well as the other data. Link to comment Share on other sites More sharing options...
thescientist Posted September 5, 2015 Share Posted September 5, 2015 You could always save the image as bas64 encoding. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now