group field - automatically enter |
7/24/2006 9:44:09 PM |
PHPRunner General questions | |
P
phpwalker author
I am using group level security... When editing or adding new records, I would like the signed in users group to automatically enter in the table they are working on... (and then I would like this field to be read-only (not change-able by the user))... |
|
J
|
Jane 7/25/2006 |
Karen, |
P
|
phpwalker author 7/25/2006 |
I have a user table: |
J
|
Jane 7/25/2006 |
Karen, function BeforeLogin($username, $password) { global $conn; $strSQL = "select * from users where UserName='".$username."'"; $rs = db_query($strSQL,$conn); $data=db_fetch_array($rs); $_SESSION["group"]=$data["group"]; return true; }
|
P
|
phpwalker author 7/25/2006 |
per instructions - I copied and pasted above code into Global --> Before Log in and now I receive the following error when going to main menu: |
P
|
phpwalker author 7/25/2006 |
sorry --- id10t error |