0

Yes, i looked for this question online, but I can not understand.

For example i know that when you log in you go to a link like :

site.com/Username

I know that you have to have a page for users in general like : user.php but how exactly you put the name of the person at the account page when log in or the discription(do you read the name from the url and take other data from the database?). I am new to php. Please explain me -Sorry for my english

jarlh
  • 42,561
  • 8
  • 45
  • 63
Phil999
  • 5
  • 3

2 Answers2

1

The Best Way to do it is make a user.php page and when user login in saves it's all data in session and when user open his profile/or something else you can retrive data from session like user id and then use your query to get the specific data against that user

Hammad Ahmed khan
  • 1,618
  • 7
  • 19
0

You can store the username/id in $_SESSION['username'] or $_SESSION['id] like this. And can access the data of the user from the username/id. Hope this might help you.

Yash Doshi
  • 1
  • 1
  • 2