linking database tables
===

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.