I'm trying to code some php for a basic footy tipping website. When the user logs in, I would like to attach the users attributes to each page they visit. In my code, the users attributes are written to a txt file when they log on, but I'm unsure how to associate this information with each page they visit.
As an example,
If Mark logs on, he only wants to see the football scores for his team. In the txt file all Mark's information is stored in an array. When he requests his information the php reads the txt file and outputs it into a table. If he want's to change any information he clicks on a link and goes to a separate HTML page which (after changes) will post the information back to the txt source file.
My problem is how to make sure that when Mark clicks on the new HTML page, how does the computer know to serve a page that Mark only has access to. I can make up a page that anyone can change details on, but when its posted, how do I identify that Mark has made the changes??? Do I use an identifier somewhere and if so what type and where in my code should it live.
Apologies for being such a broad request but some assistance would be great.