Trying to get Array session values into database with foreach with no success - only inserts last item of the array
Got a couple of days into trying to get this array to show in the 2nd page and then capture on database. All I get is the last line of the array. Attached are the files. I want to get the products into the confirm page and have it save to the database. I only get one line of products out of two.
This only applies to this line:
$ReplaceQuery->bindColumn("DetailItems", "s", "". implode(',',$value) ."", "WA_DEFAULT");
in the details table
You can see it by going to .com, Items in Stock - box, then, View Your Orders, then login with details below.
Make sure you add an x to the name of the file as such:
(otherwise you'd be in the Live one).
On pressing Reorder, it goes to the form that is filled out and press submit which the Commit page handles. That's the page that won't all the rows into the db. (There's an array within an array by the way), so I'm pretty sure my logic is not very good.
You'll see all my commented out lines in my attempt to get it to work.- No Go.