Hi I have a table which have 4 fields.
How i can give rights via DB for update, Select, Delete and insert.
For example
User A only Update Field 1
User B only Update field 2 and select all fields.
User C can delete field 3 records
User D can only Insert New data in all fields.
ayesha789
7
Posting Pro in Training
Recommended Answers
Jump to PostYou will need another table for users, and in that table you will need a column for their permission level.
Then in your PHP script, check the users permission from the DB, and only give them the options they are allowed to use.
Jump to PostHi Will Gresham,
Nice idea!, you given the option to identify for which user has which rights. but I think ayesha789 specifically expecting how to give rights for the user for updation, insertion etc via php.
Jump to Posthttp://www.daniweb.com/forums/announcement17-66.html
So far, you have shown no effort to do this on your own.
It will probably require one or more of the following:
http://uk2.php.net/manual/en/control-structures.switch.php
http://uk2.php.net/manual/en/control-structures.if.php
http://uk2.php.net/manual/en/function.msql-query.php
All 11 Replies
Will Gresham
81
Master Poster
ayesha789
7
Posting Pro in Training
ayesha789
7
Posting Pro in Training
rajarajan2017
ayesha789
7
Posting Pro in Training
ayesha789
7
Posting Pro in Training
ayesha789
7
Posting Pro in Training
Will Gresham
81
Master Poster
ayesha789
7
Posting Pro in Training
ayesha789
7
Posting Pro in Training
ayesha789
7
Posting Pro in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.