I’m wading deeper and deeper into unknown territory with a project I’m working on. As part of it I have to have a login creation system for both admins and users. Admins need to be able to create products and users need to be able to purchase the products so the details need to be linked to their accounts. I’m a bit lost as to where I should start. There is lots of info out there about sql databases but what is the logic behind what I’m trying to achieve?
I’m currently working with php and html forms to collect the data.
I’m wading deeper and deeper into unknown territory with a project I’m working on.
Share
Basically what you need is to create a mysql database, I will suggest to use navicat as database editor.
Then I would suggest you to create 2 tables, category,item.
Simplest table structure
category:
item:
Then what you need to do is using intergrated mysql functions, I suggest you use this as your guide how to use database with PHP, send data to database and recieve data from database.
And basically this is it.
EDIT1: So basically you need to restructure your database.
Admin table:
User table:
Item table:
Shop Table:
Sales table:
When Admin ID=x chooses Shop id=x1 and creates Item with shop=x1 and admin=x with unique ID=x3, a user can buy Item ID=x3 and when it is sold you either