Index of /guides/php/examples/simple-calculate

      Name                    Last modified       Size  Description

[DIR] Parent Directory 06-Feb-2010 20:08 - [   ] calcul.php 27-Nov-2007 11:37 1k [   ] calcul.phps 27-Nov-2007 11:37 1k [TXT] calcul.text 27-Nov-2007 11:37 1k Ascii file (View Source with IE ?) [   ] calcul2.php 23-Feb-2000 19:56 1k [   ] calcul2.phps 23-Feb-2000 19:56 1k [TXT] calcul2.text 23-Feb-2000 19:56 1k Ascii file (View Source with IE ?) [   ] calcul3.php 16-Jan-2006 17:28 1k [   ] calcul3.phps 16-Jan-2006 17:28 1k [   ] calcul4.php 17-Jun-2002 09:21 1k [   ] calcul4.phps 17-Jun-2002 09:21 1k [   ] form-calcul.php 02-Mar-2000 18:21 2k [   ] form-calcul.phps 02-Mar-2000 18:21 2k [TXT] form-calcul.text 02-Mar-2000 18:21 2k Ascii file (View Source with IE ?) [TXT] formulaire.html 27-Nov-2007 11:26 1k [TXT] formulaire.text 27-Nov-2007 11:26 1k Ascii file (View Source with IE ?) [TXT] formulaire2.html 23-Feb-2000 19:56 1k [   ] formulaire2.phps 23-Feb-2000 19:56 1k [TXT] formulaire3.html 29-Nov-2000 17:11 2k [TXT] formulaire3.text 29-Nov-2000 17:11 2k Ascii file (View Source with IE ?) [TXT] formulaire4.html 17-Jun-2002 09:17 2k [TXT] formulaire4.text 17-Jun-2002 09:17 2k Ascii file (View Source with IE ?)

Simple HTML Form processing with PHP

Demos how to process a simple HTML form, i.e. two simple "radio button" questions. Examples:

(1) Start with formulaire.html. The form in this html page (source is in formulaire.text) is sent to calcul.php that does the processing (see calcul.phps and calcul.text for source code).

(2) formulaire2.html shows how to use arrays (a single name/variable for 2 questions). File calcul2.php does the processing (calcul2.phps and calcul2.text for looking at the code).

(3) form-calcul.php shows how to to do both the form and the processing in one page. This is my preferred method for doing simple things, but a bit more difficult to understand.


See our JSP version if you are also interested in Java Server Pages (JSP)

We also have a JHTML(Old Java Server Pages) version: http://tecfa2.unige.ch:8080/develop/jhtml-ex/simple-calcul/formulaire.html and servlets, JavaScript versions [links to insert]

D.K.S.