User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 374,181 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,403 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 180 | Replies: 1
Reply
Join Date: Jul 2007
Posts: 15
Reputation: gopi kannan is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
gopi kannan gopi kannan is offline Offline
Newbie Poster

Help switching between forms

  #1  
Feb 23rd, 2008
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..
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2005
Location: Harare, Zimbabwe
Posts: 33
Reputation: tirivamwe is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 2
tirivamwe's Avatar
tirivamwe tirivamwe is online now Online
Light Poster

Re: switching between forms

  #2  
Feb 23rd, 2008
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'); 
	}
If you find this useful you can add to my reputation
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb PHP Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 4:43 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC