Originally posted by matt001
I am creating a Computer Product Database, and I have hit a hurdle in the design / coding in one part of it.
Run quickly, and then JUMP!
I have got a form that type in all the product details and I can submit it to the mysql database thats all fine.
Good. You'll need those skills for this hurdle also.
But I am wanting to assocaite products with suppliers with the same form,
Well, you can't do it with the EXACT same form.
You can modify it, perhaps, or maybe you'll want to create another form which does this job. It's all up to you and your plans for the design of the application.
If you're not dealing with huge numbers of products, I'd suggest getting into arrays and utilizing them, although more experienced coders may have better ways.
The basic steps that you need to climb:
Connect to the db and get a list of products, or even a single product.
Get a list of suppliers from ?? (database?).
Create an HTML form that lists the product(s) and the suppliers. Sounds like a SELECT might be good for this.
Create a handler script (or portion of a script) that will accept the information (product and supplier) and update a database table to reflect the new association, then report its progress and ask if you'd like to do another, or whatever.
There could be some other steps, I guess. Hopefully these ideas will give you some food for thought; maybe you can get going again and then hit us with any specific issues you might come up against 🙂