mysql - PHP DATABASE - USERS -
how 1 allow user have privileges remove/add items products database?
- users - -------------------------------------------------------------------- | name | surname | country | address | email | username | password | -------------------------------------------------------------------- - products - ------------------------------ | id | item | prize | number | ------------------------------
- id: product id;
- item: product name;
- prize: product price;
- number: product availability.
for simplest thing can try, can add user_type
column in users
table , use value in php code. example:
<?php //select data users table first if ($row['user_type'] == "admin"){ //put here functions and/or objects want done under admin control } else{ //put here functions and/or objects want done under other users } ?>
there many ways on how it. need think of one.
Comments
Post a Comment