This topic is locked

how to show values on dropdown list depended on user

10/21/2009 9:13:39 AM
PHPRunner General questions
F
futo author

hello,
all my table in project have security settings so that users can see and edit they own data only.
but, on add.php page i have 3 dropdown list, but security settings don't work good.
user1 can see values in dropdown list from user2
is there any custom code to set up this thing to work...
thanks
Tomo
PHPRunner 5.1 2503 trial

P
Phil_G 10/21/2009

I would guess you have to build it into the box query, using the WHERE clause with appropriate joins on your user tables



hello,
all my table in project have security settings so that users can see and edit they own data only.
but, on add.php page i have 3 dropdown list, but security settings don't work good.
user1 can see values in dropdown list from user2
is there any custom code to set up this thing to work...
thanks
Tomo
PHPRunner 5.1 2503 trial

F
futo author 10/21/2009

Hi Filippe,
Show me somme code...

I have users_table with fields: ID, Company, Name, Email, Adresss

and table called CustomOffice with fields: ID, Name, Code
...



I would guess you have to build it into the box query, using the WHERE clause with appropriate joins on your user tables

Sergey Kornilov admin 10/21/2009

Use WHERE clause to filter data in dropdown box.
If UserID is a text field:

" UserID = '" . $_SESSION["UserID"] . "'"


If numeric:

" UserID = " . $_SESSION["UserID"]


More info:

http://www.xlinesoft.com/phprunner/docs/lookup_wizard.htm

F
futo author 10/22/2009



Use WHERE clause to filter data in dropdown box.
If UserID is a text field:

" UserID = '" . $_SESSION["UserID"] . "'"


If numeric:

" UserID = " . $_SESSION["UserID"]


More info:

http://www.xlinesoft.com/phprunner/docs/lookup_wizard.htm


hello,
PROBLEM (for me) RESOLVED THANKS...