close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


Getting Array session into database

Thread began 10/09/2019 11:21 pm by lr_leal239405 | Last modified 10/16/2019 5:22 pm by Ray Borduin | 43 views | 5 replies |


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, 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.

Attached Files
Sign in to reply to this post

Ray BorduinWebAssist

There is a lot of custom code and commented out code on this page. I think we would have to do a screen sharing session with a premier support ticket to hash this out and find a solution.

If $value is set correctly as an array, then it might be as simple as using:
$ReplaceQuery->bindColumn("DetailItems", "s", $value, "WA_DEFAULT");

But I'd have to do debugging and work through everything up to that point to be confident. I don't think I can do all that in the context of a forum post.

Sign in to reply to this post


ok. I thought so. I can call you later.

Sign in to reply to this post


what is the latest I can call you tonight (or what works for you).

It's probably going to take about 15 after I show you.

Sign in to reply to this post

Ray BorduinWebAssist

Tomorrow morning would be better... but if you try tonight I may be available. Honestly the later the better like after the kids go to bed might work.

Sign in to reply to this post


I'll call you later tonight, but just to simplify what I'm trying to do is get the value of the ForEach on the order_quoted_itemx.php to the confirm_order_quoted_itemx.php and have it go to the database. I only get the last value (of session I guess) from the while loop.

(the files without the x on the name are the live files).

I cleaned up a bunch of commented out lines (which were my attempts)

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...