How to redirect based on Access level in Dreamweaver

Status
Not open for further replies.

amitava82

MMO Addict
Say, I have 2 access-level: 1 is for "user" and 2 is for "admin"

When a user logs in, if the access level is 1 then the user must be redirected to welcome.php and if the user has a access-level 2 then he/she will be redirected to admin.php

So, how do i do it in Dreamweaver CS3? I don't know much about php, so easy please..:)
 

ray|raven

Think Zen.
What are using as base for ur web-app?
JSP?ASP?
You need to use one of em to retrieve userid's/passwords and for redirection to different webpages on logon.

Regards,
ray
 
OP
amitava82

amitava82

MMO Addict
Its PHP - MySql as you can see from my redirection page names..

And I have done everything related to user login system. I'm stuck with redirection thing..
 

ray|raven

Think Zen.
Oops!Sorry mate.Missed the obvious part of the post. ;)
Sorry cant help u there,i dont know nuthin bout PHP.
If it was JSP/ASP i cud've helped u.

EDIT:Found a link that might help u,
Code:
*www.devnewz.com/devnewz-3-20040326RedirectingaPageUsingPHP.html

Regards,
ray
 
OP
amitava82

amitava82

MMO Addict
Thanks pal. I got the idea from the link you provided. Here is the code I used to redirect:
Code:
<?php
if ($_SESSION['MM_UserGroup'] == 2)
{
header('Location:admin.php');
}
?>
 
Status
Not open for further replies.
Top Bottom