How to create and pass session from login page...
|
Posted: 03/05/2004, 6:38 AM |
|
Situation
========
I have simple database with
user_id
user_login
user_passwd
user_groupID
companyID
Taks
======
I need to be able to create a group adminstrator how is "managing" users within its company
i.e.: admin loggs in, system recognises that he has a companyID, "prints" it out in header, for instance, and the when he / she create a new user that comanyID is passed further.
I presume - from last posting - it should be done via sessions.
question
=========
How do I creat / set a session for countryID and pass it from login.php to list.php
What I've done so far:
=============
Created custom session id in login page in Buyddon_DoLogin > OnClick (Server)
//Custom Code @8-ADD652EE
// -------------------------
global $Login;
global $DBConnection1;
$CompanyID = CCDLookUp("companyID","user","user_id=".CCGetUserID(), $DBConnection1);
// -------------------------
//End Custom Code
Question
===========
Is it correct?
If yest then
1 how do I make the $CopmpanyID "become" a lable
2 how do I filter a record set using datasource / session...
I presume i need the 1) to make sure that the sesion has been passed.
Please advise
Thanks!
|