I’m developing a website in PHP for my church, and part of the site uses a MySQL database to make maintaining pages that change often easier. I have the code for pulling the data out of the database and displaying it on the page completed, and I have rudimentary code for entering data into the database, but I’m working on implementing a single management page which will branch off into the different sections to make it easier for less technical church members to update and add data.
I don’t want just anyone to be able to enter data into the database, so I’m trying to make the page so that a user logs in with database credentials and can then use the admin pages to add/update data. The problem is I can’t figure out how to make the login data captured in the form on the first page persist to each page after that without it displaying in the title bar of each subsequent page that loads.
I keep reading about session variables and cookies, but I can’t seem to make either of them work. Either I’m not doing something right or they’re no better than any other variable I could use in a PHP page.
Could someone please help me figure this out?