I am having trouble figuring out how to do an everyday thing...but with a little twist on it.
My site sells Digital downloadable products in 8 languages. Right now I have a form that lets me choose what category I want too add the product too, enter a title for it, select what languages of the 8 I want too add this product too...
Then I enter the # pages the product is (it's an ebook) and have file input values for uploading each different language version of the item I have selected. This works fine as is...but Here's what I am not trying too do.
I want too have a function where I can add and remove languages dynamically. Which in itself is np! But now when it comes too my upload form it does become a problem. RIght now the number of File upload boxes, and # of pages boxes in my form is static b/c I know I only have 8 languages too choose from...But how will I set my form values up if everything is dynamic.
i.e. I won't know how many Text input values there needs too be for the # of pages and I won't know how many File Input values I need too upload the files? (I may have confused everyone now...)
I am guessing I need too set the VALUES of the TEXT inputs and FILE inputs too some sort of dynamic value.
Once the form is submitted it is handed too the form handler page that COPY's the files too the correct directory and makes and entery in my PRODUCTS table for each language version of the product...
SO what I am trying too figure out is how I can set dynamic values for form variables and then access them again in the Form handler page..(pretty sure I can access them some how using the $_POST variable...)
ANy help would be appreciated....
My first thought was store everything in and ARRAY? but then some of the values would be empty? And can I store an ARRAY of files that I have uploaded?