i have table titled gorups have posting enum('yes','no') delete enum('yes','no') in the gorups table
how i can make Permission system in php this mean
when write
if(Permis['posting']=='yes'){
echo ok;
}
i have table titled gorups have posting enum('yes','no') delete enum('yes','no') in the gorups table
how i can make Permission system in php this mean
when write
if(Permis['posting']=='yes'){
echo ok;
}
Assuming your are using MySQL, why not use BOOLEAN or the equivalent TINYINT(1) instead of ENUM? There is no reason to use strings 'yes' and 'no' when they are really booleans true and false.
Stuff like that can be handled through an ACL. One implementation of an ACL in PHP is Zend_Acl. If you do not want to use an ACL but just your database and your own code, you would have to write some code that queries your database for the permission of the Group, e.g. SELECT posting from Groups where id = [groupId]
.