user authentication and conditional redirect by Login

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
phpRoundX
Forum Newbie
Posts: 7
Joined: Mon Dec 30, 2002 6:43 am

user authentication and conditional redirect by Login

Post by phpRoundX »

I've made a Web-Frontend. User can connect and access certain areas.
The Script includes admin-Areas. ...so far ...
Now my Problem:

The Script ist written in PHP and use a MySQL-DB. The Authentificationpart gets the Information out of an DB-Table. For one part, i need a script or code, wich checks a specific Login and redirect to a Infopage or so..
I think its possible to do that with a switch or if ????!!, but maybe someone knows a better way for that.

Jan
User avatar
daven
Forum Contributor
Posts: 332
Joined: Tue Dec 17, 2002 1:29 pm
Location: Gaithersburg, MD
Contact:

Post by daven »

if you are going to hardcode the logins, then a switch statement is your best bet. You might also want to consider having an additional column in your table which has various permission levels, and base the switch statement off of that column. That way, you will not have to alter your code every time you get a new user.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Please don't cross-post. Choose the most appropriate forum and post there. Additional threads will be deleted.

Mac
Post Reply