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..

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'); 
	}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.