i am building a simple online portal and i have done all the login ,registration pages and all the fields successfully get uploaded in the database but now

all i got is a product display page and an shopping cart

1. i want help is how do i pass the information from the product page to cart page
2.concurrently update in the database i.e. mysql
3.if customer wants he can remove a product from the cart.

can u help me with all..am wondering since 10 days now hope you guys help me out.thank you.

Thanx the session thing just helped me out..i was able to make the cart too and update it but now the problem i face is


the checkout and ordering thing ... i want to pass the session variables of my cart to
the database and then let the user fill the shipping info and process the order if i get any sort of help on this will be thankful..

i am building a simple online portal and i have done all the login ,registration pages and all the fields successfully get uploaded in the database but now

all i got is a product display page and an shopping cart

1. i want help is how do i pass the information from the product page to cart page
2.concurrently update in the database i.e. mysql
3.if customer wants he can remove a product from the cart.

can u help me with all..am wondering since 10 days now hope you guys help me out.thank you.

Several answers could come handy for your request, I will try to mention few:

  1. Passing information to other pages could be done by either POST or GET requests in e.g. sending product id's and handling them with the $_POST, $_GET or $_REQUEST superglobals . Or you may store the chosen products in a temporary cookie/session and catch them at the cart page with $_COOKIE or $_SESSION
  2. You may update the database entries at the cart page when the request is received and validated. Or if you are heading to dynamic content and interval-based updates, you may need to use AJAX requests and jQuery is what I suggest using for that
  3. This depends on the method you used to update.
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.