12-get_variables/add2.php File Reference

This program demonstrates how we can display HTML form and accept values of same form using same PHP page. More...

Go to the source code of this file.

Functions

 main ()
 This function checks if form was submitted or not.


Detailed Description

This program demonstrates how we can display HTML form and accept values of same form using same PHP page.

Some programmers prefer this so that all logic related to one page is present in one single PHP file.

Author:
Saurabh Barjatiya
Version:
1.0

Definition in file add2.php.


Function Documentation

main (  ) 

This function checks if form was submitted or not.

If form was submitted then it uses check_and_get() function to obtain values of num1 and num2 after ensuring that they were indeed supplied. Then this function adds those two numbers and displays sum on screen. If form was not submitted indicating refresh or opening of page for first time, then it displays form.

Returns:
Nothing.

Definition at line 26 of file add2.php.

References check_and_get(), and display_add_form().


Generated on Fri Nov 4 14:16:55 2011 for PHP example documentation by  doxygen 1.4.7