Go to the source code of this file.
Functions | |
main () | |
This function checks if form was submitted or not. |
Some programmers prefer this so that all logic related to one page is present in one single PHP file.
Definition in file add2.php.
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.
Definition at line 26 of file add2.php.
References check_and_get(), and display_add_form().