this is my first post so I hope I am doing this in the correct place. I need a little help here, I have looked at my books and the web forums for some answer but to no avail.
Simply, I am passing normal post data to a page to handle the data. The form is created dynamically and as such I do not know the whick field names will be there.
The two main values I need to capture are, for instance qty_235 and unitprice_235, where the 235 is the product id. Using the standard
Code: Select all
foreach ($_POST as $key => $value) {
...
}
means I can list all the values, however, in each case I want intervene in the loop and retrieve the product id [235 in the case above], the unitprice and qty.
I have tried inserting if statement to strrpos for q or u, explode the qty to retrieve the pid, pretty much everything I can think of but by inserting the if statement the loop breaks and I end up the last value sent from the form only?
Thanks in advance for any help
A