I am in a web scripting class and our teacher is very strict on the guidelines of the assignment, as he has scripts that grade our work. With that being said we are allowed to use only two forms for our assignment, one for logging in (form 1) and one for submitting data to be entered into a database (form 2).
My instructions say:
- A user is required to submit their login credentials on form 1
- If upon entering valid credentials the user is taken from form 1 to form 2
I've been saving state information for form 1 via hidden input types that will have form 1 either collect login credentials or check the login credentials. I can do that great and I can also in fact check the login in credentials great too. When the user is valid I can also redirect to form 2 via header(). My problem is I need to save some sort of state information on what type of user was just validated (there can be an admin or regular user), and from what I understand at http://php.net/manual/en/function.header.php that the way I was saving my state information via hidden input types won't work as header() must be called before any actual output is sent.
Could someone please help point me in the right direction or inform me on how I can accomplish a redirect to form 2 while some how saving information on whether or not an admin or regular user was just validated?
I was thinking of using my database to save the information but that doesn't seem very effective at all.
Thanks for all the help. :D