Best way to build site with different type of users

View: New views
1 Messages — Rating Filter:   Alert me  

Best way to build site with different type of users

by Massimiliano Marini :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

I need some suggest, advice, information that help me in a right way:

I want to build a site that have different type of users, like for
example "admin" and "normal user".

I've a form for the authentication, when the username and password are
validated I will display the right section/panel.

In file auth.php I validate username and password if are right I do:

set all the $_SESSION[''] that I need

Now one way may be this :
header("Location: index.php");
I will continue to manage all the option with:
if(isset($admin_index)) or if(isset($user_section)) in the same file
index.php and index.tpl

Or in this way :
header("Location: user/index.php");
(I'm having problem in this way because the path for smarty is not
right and I receive this error:
Warning: Smarty error: unable to read resource)

There are other (better) solutions?
Any impressions, informations, helps are appreciated.

--
Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/
"It's easier to invent the future than to predict it."  -- Alan Kay

--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

LightInTheBox - Buy quality products at wholesale price