DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   PHP (http://www.daniweb.com/forums/forum17.html)
-   -   switching between forms (http://www.daniweb.com/forums/thread110478.html)

gopi kannan Feb 23rd, 2008 1:32 am
switching between forms
 
iam designing a login page..while validating the login ..i have to check whether the user is ordinary user or administrator...i have to display different page for each one..i did the validation process..but how to switch to administrator.php say if the user is an administrator..can i use <form> for this..

tirivamwe Feb 23rd, 2008 2:01 am
Re: switching between forms
 
try to use page redirection to the required page after user validation

You can try this code




if ($user="admin")
        {
                header('Location: admin.php');
        }
else
        {
                header('Location: ordinary_user.php');
        }


All times are GMT -4. The time now is 3:48 am.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC