Skip to main content
Known Participant
July 23, 2009
Question

php access level from login

  • July 23, 2009
  • 2 replies
  • 3255 views

using php to build a login. i have 14 different pages. I want 14 users with their own un/pw to see his/her own page. in my db i setup users name pw access level. i also in dw use the restrict page bassed on access level. however where do i set who goes to which page? example. Im a football player,  i log in under football and get the football page. if i log in under baseball i get the baseball page.

can you help?

This topic has been closed for replies.

2 replies

Known Participant
July 23, 2009

What if I just did a simple php if statement based on access level. example if access leve = '' redirect to (url)?

DwFAQ
Participating Frequently
July 23, 2009

How do you determine the access level? Through a session variable.

You could try the other way and if that works for you that's great!

Known Participant
July 27, 2009

$_SESSION['MM_UserGroup'] = $acessLevel;

$_SESSION['MM_Username'] = $username;

Use this two sessions, filter by using if-then statement

Anyway, im not really understand what u need

>How do i populate a text input field with a word based on user access level.

I guess maybe u can try to use $_GET['$accessLevel']. Something like, when user login, then u can see textfield already stated with Dallas. Maybe u can try like below:

if($_GET['accessLevel'] == 'leader') {

$textfield = 'Dallas';

}

Then at the textfield, click at the text field, see at the properties. U can see from the value field, add this one <?php echo $textfield; ?>.


Sweet. Thanks.. Ill let you know how it turns out.

DwFAQ
Participating Frequently
July 23, 2009

Set access level by using a session variable. Look here for info on how to create a session variable. Then use an if statement to direct to access page based on session variable. By default DW creates a session variable MM_Username you can create a filtered recordset from this session variable to create additional session variables for other database table fields for logged in user.

Does that help?

Known Participant
July 23, 2009

Ill try it. thanksl