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

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -