old newbie Posted August 11, 2020 Share Posted August 11, 2020 I am stuck with a problem. Have a shopping cart, once the client selects the products, from a SQL table (1), they are taken up by an array variable A session array variable delivers values using foreach loop. The php shows all the values sequentially But the SQL table (2) gets updated with only the last value. Understand that this will happen due to looping. So how to go about resolving this Link to comment Share on other sites More sharing options...
dsonesuk Posted August 11, 2020 Share Posted August 11, 2020 As it loop through each item with php it should also save that single item to the database. The database should have a unique id that increments on every creation of new record. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now