Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3356582
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:31:49+00:00 2026-05-18T02:31:49+00:00

Okay, so I have a shopping cart problem. I’ve decided to roll out my

  • 0

Okay, so I have a shopping cart problem.

I’ve decided to roll out my own cart, which is alot easier than I had expected. BUT, I’ve run into a problem and cannot for the life of me figure out what to do next.

The problem:

After adding products to the cart, the user is taken to a “checkout” page, where they edit the quantities of the items they want.

These items are displayed in a table.

How can I get these items with their edited/new values into a PHP variable, and then update the corresponding entries in the database?

The page in question is:

But to actually see stuff in the “checkout” page, you’ll need to visit:

http://www.com.au/.php and click on a few prices, and then click “Place Order” link just above the table.

Any help/advice at all would be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T02:31:49+00:00Added an answer on May 18, 2026 at 2:31 am

    If I understand you correctly, you just need to add a input variable.

    <tr>
        <td>Cool Item</td>
        <td><input type='text' name='items[<?=$product_id;?>]' value='1' /></td>
    </tr>
    

    Then check the $_POST[‘items’] array.

    foreach($_POST['items'] as $product_ID=>$quanity) {
        proccessItem($product_ID, $quanity);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay I have a series of objects based on a base class which are
Okay I have the following problem. I want to get the current dateTime and
Okay -- we have an interesting problem. Some background: Our main application uses Indy
Okay I have a well known problem. I want to implement a tableview controller
Okay I have a webView which loads a web page. The web view fits
I have trouble translating the phrase %s was added to your shopping cart. in
I have some animation I would like to try, kind of a shopping cart/checkout
Okay I have a list of devices where i can select which to edit.
Okay I have a jQuery dialog box which has a form in it and
Is it okay to have default constructor which sets some default values like: public

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.