This topic is locked

How to edit own data

6/23/2008 12:35:22 PM
PHPRunner General questions
S
swanside author

Hello
I have a database with a timesheet table in it. This contains three fields, Engineers_Name, TSH and Timesheet_ID
I also have an account table with Engineers_Name, Passwords and notes.
If engineer A Smith logs in, I want him to only see any information in the timesheet table with the same name and no others, also to be able to enter his hours and store them under his own name.
Is this possible?
Thanks

Paul.

Sergey Kornilov admin 6/23/2008

Yes, use advanced security option "Users can see and edit their own data only". Use Engineers_Name field in both tables to link data.

S
swanside author 6/23/2008

Yes, use advanced security option "Users can see and edit their own data only". Use Engineers_Name field in both tables to link data.


Thanks Sergey,
What I am lookinh for aswell, is, when the user logs in to the timesheet table. His name is automatically selected in the Engineers_Name field and he is not able to search for it. But If Admin log in, they can use the dropdown to add the infomation into the timesheet table.

Sergey Kornilov admin 6/23/2008

I miss the question here.

S
swanside author 6/24/2008

I miss the question here.


OK, An engineer called John Smith logs in. He can only see the timesheet modual. In the timesheet modual there are two fields. Engineers_Name and TSH.
Engineers_Name access a table called accounts that has all the engineers names, passwords and group id

TSH logs the time spent on a job.
So John Smith has logged in and is presented with a drop down box. I need o be able to set the properties so either all the names are disabled and only John Smith is enabled to be selected. But if a member of the admin group signs in, they can have the choice to select any engineer from the same dropdown box on the Engineers_Name.
The same will aply if an engineer Peter Brown logs in, on the drop down list only his name is visable.
Or, if they select the wrong name, they can not save any data?
Cheers

Paul.

S
swanside author 6/24/2008



OK, An engineer called John Smith logs in. He can only see the timesheet modual. In the timesheet modual there are two fields. Engineers_Name and TSH.
Engineers_Name access a table called accounts that has all the engineers names, passwords and group id

TSH logs the time spent on a job.
So John Smith has logged in and is presented with a drop down box. I need o be able to set the properties so either all the names are disabled and only John Smith is enabled to be selected. But if a member of the admin group signs in, they can have the choice to select any engineer from the same dropdown box on the Engineers_Name.
The same will aply if an engineer Peter Brown logs in, on the drop down list only his name is visable.
Or, if they select the wrong name, they can not save any data?
Cheers

Paul.
Its OK, Sorted it out now. I re-read your other post

J
Jane 6/24/2008

Hi,
I see what you're saying.

You need to create custom view for admin account only.