Jump to content

Dynamic Form info into a Multi-Dimensional Array


Photozrme

Recommended Posts

Hello everyone,

 

I'm working on a PHP workflow management project at my company to help increase our productivity.  So far I've done a soft rollout and it's working really well.  My issue right now is I need help on how to handle dynamic form variables.  I thought multi-dimensional arrays would be the best option.  I have 3 dynamic fields:

 

Productid[]  |  Quanitityid[]  |  Costid[]

 

Essentially for each line, I would need to do a database search on the productid to find the cost, and then multiply it by the quantityid and store the cost as costid[].  My idea was to use a multi-dimensional array into one entry on a database for the whole thing, and perform MySQL lookup and math functions within the array.  Then, later on, I would be able to pull statistics of cost based on the costid[] of all the entries (based on datestamp and whatnot).

 

I'm not asking anyone to write the code for me, just to point me in the right direction.  Should I store each element separately?  Or is there a better way to do this?  Or am I not making any sense?  :P

 

Thank you very much!  :D

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.