Wasn't sure what to title this question.
I have a web app that has a user side and an administrator side. Both have different session names and logins of coures. My problem is many files I need to use for both are almost exactly the same other than the session name. Right now I am appending admin to the name. Like getFile.php and adminGetFile.php. Is the a way to allow the admin user to access the user php files? Or am I just better to create separate admin files for everything?
Thanksthe way i see it (i may be wrong) is
you could say that admin are user with more rights...
add rights to the user table, and in your script, it check the rights of the user giving the correct info and tools.Hmm, The more I look at it the more I think its easier just to have admin php files. I think this might be more secure also. I have a separate table for the admin users and the session is what checks the rights. If I added rights to a generic users table I think it could get really complicated.I keep my admin files totally seperate from the users file.
I have a web app that has a user side and an administrator side. Both have different session names and logins of coures. My problem is many files I need to use for both are almost exactly the same other than the session name. Right now I am appending admin to the name. Like getFile.php and adminGetFile.php. Is the a way to allow the admin user to access the user php files? Or am I just better to create separate admin files for everything?
Thanksthe way i see it (i may be wrong) is
you could say that admin are user with more rights...
add rights to the user table, and in your script, it check the rights of the user giving the correct info and tools.Hmm, The more I look at it the more I think its easier just to have admin php files. I think this might be more secure also. I have a separate table for the admin users and the session is what checks the rights. If I added rights to a generic users table I think it could get really complicated.I keep my admin files totally seperate from the users file.