All users have one profile | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

All users have one profile

I made login, registration and profile and I also added function for posting pictures with description but when I post pictures from different user accounts, they are posted on one profile.php page and every user post pictures on same page. They don't have their own profile page and profile link, something like profile.php?id=1. Can someone say to me what code I need to add on my profile.php or registration.php https://code.sololearn.com/wbcGm6OKWJxN/?ref=app

19th Apr 2021, 9:45 PM
Aleksa
1 Answer
+ 1
Aleksa Every user have their own unique id suppose profileId. So whenever any user will login then you have to store profileId in session. Every session will be different from other users so no need to worry. Whenever any user will post pictures then using that profileId which is store in session, you can update records or insert new data.
20th Apr 2021, 4:50 AM
A͢J
A͢J - avatar