Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
| Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old May 24th, 2007, 01:10 PM
Registered User
Join Date: May 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to interpret checkboxes on server-side forms


I'm a beginer coder with javascript and PHP

I am coding a (very) basic online-store:


I am currently in the process of writing the PHP code to deal with the information on the form when it is submitted, and have hit a brick wall.

As you can see I only have three 'products' on this website. I am conciously not allowing the user to buy these products in varying quantities, rather forcing the user to select which products they would like via the checkboxes.

With the PHP code I am trying to design an order confirmation page, which will display the user's contact details and order details and ask them to confirm that they are correct.

I have got the textbox values working on the server side, but I am struggling with the checkboxes.

I want to be able to check which checkboxes are checked, and display the relevant product and price on the confirmation page.

For example, if the user submits the form with the Tshirt checkbox checked, I would like the PHP to return

quote:Please confirm the following details are correct:

firstname surname
email address

Tshirt - £10
I cannot, however, figure out how to combine javascript and PHP in order to do this.

In searching, I have found similar example code, but it is much more complex than what I am trying to achieve and I cannot comprehend it.

Any help would be greatly appreciated guys

thanks in advance - Ravie

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem Converting Client-side to Server-side Code kwilliams ASP.NET 2.0 Professional 1 November 21st, 2007 05:25 PM
How to interpret checkboxes on server-side forms Ravie PHP How-To 1 June 6th, 2007 05:34 AM
Checkboxes and continuous forms mdProgrammer Access VBA 4 August 3rd, 2006 09:47 AM
Firing server side events at client side codes mehdi62b ASP.NET 1.0 and 1.1 Basics 6 May 18th, 2005 09:11 AM
Accessing Server Side Data on Client Side steve456 Classic ASP Professional 3 October 15th, 2003 02:33 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.