I just finished my MySQL for Dummies book and I've messed around with a few things trying to teach myself. Basically I'm a noob.
Here's what I have working right now:
You load the webpage. You type in login info. Via _POST the submitted info sends the user to the login check page where checks the info against what's in the table. If it's correct, you get header(); to the welcome page, and if the info is wrong, it says it's incorrect and gives a link to go back to try again.
What I want:
I added a column in my table called permissions. After validating the login info is "ok", I want it to goto a different page depending on what info is in the permissions column for that username. Basically, I want a "back-end" page where I can use my MYSQL query page and other admin related stuff from logging in and having a "1" as my permission level, but if anyone else logs in they get different content.
From what I've seen, PHP doesn't like me using header(); more than once in a page. So, how would I create dynamic content?
What I'm thinking might work:
I could just set a cookie variable to the permission level and use IF statements in the "logged in page" to display links to admin content (or not) depending on the permission level. Is this the way to go about it?
Please know that I'm a noob, I know html very well and I've done a little C++ in the past so I'm not a complete programming noob but as far as PHP goes it's new to me, so ANY help would be very much appreciated.
Thanks ahead of time, and sorry for the wall of text, I'm not very good at summarizing.