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.