Connecting Tech Pros Worldwide Help | Site Map

search 2 tables to get different session

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 10th, 2005, 04:55 PM
Carramba
Guest
 
Posts: n/a
Default search 2 tables to get different session

hello!

I have sipmle logging script that cechs is user exist in user_table and if
pasword is corect.
know I want to serch 2 tables user_table and admin_table to lock if person
is user or admin
if admin I want to set one kind of permitions (to se specific pages) if
user to se.
that is the best way to do it?
should I set session to "user_id" and "admin_id" to se who is logget in?




Thanx in advance
________________________




  #2  
Old November 10th, 2005, 05:35 PM
puneet.kandhari@gmail.com
Guest
 
Posts: n/a
Default Re: search 2 tables to get different session

add a field to the user_table which has a groupd setting say
admin == 1
logged in == 2
anonymous == 3
and so on
a small look up table to get the assocaited permissions for each group
and this would be all one query using a join.

When you have validated the user also get his group id and group
permissions.

on the other hand if different users have different permissions try
this
make a user_id/permission_id table. On Validation check what permission
set that user id is associated with and then retrieve the same from
your admin table

--
take care
puneet

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.