I need advice about making a PHP form and MYSQL base.
First, I'll give an example of what I trying to make:
I'm trying to make a MYSQL base of products, then to make new base of ingredients and then to make php form for Add new products and it's ingredients but what is a question here? If I make table products with Name and total weight, and another table ingredients with just Name, how is it possible to add new rows in table Products with name from ingredients table (that will be structure) + weight of that ingredients (that will be value of that structure).
Only solution in my head is to make MSQL table products with a structure that will contain the names of all the ingredients but it is not a good solution for me, that will be a very long structure.
It would be best if I could through the php form add new structure/rows in the database Products.
And one more thing that I need advice is:
How to make a php form that will not show all ingredients in form, just show entries name (from ingredients table) and weight then + add new ingredients, then will open again (name and weight then + add new....) that will add new structure/rows in the database Products with name=(name from ingredients list) and weight as value?
I've made a small localhost cms in which I trying to add this feature.
I'm not good with English, I'm bad in writing but good in understanding :)
I hope I managed to explain what I'm trying to do.
Thank you all for your time to review this topic!