O'Reilly logo

PHP jQuery Cookbook by Vijay Joshi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Updating items in a shopping cart

We will try to create a simple page with a list of items with their price and quantity. The user will be able to select any number of a particular item and that information will be sent to the server side. The server-side script will calculate the prices of selections and will show the net price to the user.

This is similar to a shopping cart as you might have seen in many sites. The difference is that a page reload will not occur and the user will have to wait less. This recipe is a basic example and you can enhance it in many ways to suit your requirements.

Getting ready

Create a folder named Recipe6 inside the Chapter6 directory. Next, under the same directory, create an XML file that will have a list of some ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required