12-get_variables/common_functions.php File Reference

This PHP page is not intended to be executed directly from browser. More...

Go to the source code of this file.

Functions

 check_and_get ($variable1)
 This function takes name of variable as parameter.
 display_add_form ($action, $message)
 This function displays form that gives two text-boxes and a submit button.
 display_links ()
 This function is used to display links for all three types of add implementations in form using anchor tags.


Detailed Description

This PHP page is not intended to be executed directly from browser.

This has definitions of functions that can be reused in more than one page.

Author:
Saurabh Barjatiya
Version:
1.0

Definition in file common_functions.php.


Function Documentation

check_and_get ( variable1  ) 

This function takes name of variable as parameter.

It then checks whether the variables value has been supplied using GET method or not.

Returns:
Returns value of variable given as argument passed via GET. If given variable is not passed then function prints error message and exits script.

Definition at line 50 of file common_functions.php.

Referenced by main().

display_add_form ( action,
message 
)

This function displays form that gives two text-boxes and a submit button.

When users clicks submit button values are passed to same page using form action attribute with GET method.

Parameters:
action Name of page to be used as value for action attribute of form being generated.
message Optional message to be displayed at top of page.
Returns:
Nothing

Definition at line 20 of file common_functions.php.

References $message, and display_links().

Referenced by main().

display_links (  ) 

This function is used to display links for all three types of add implementations in form using anchor tags.

Returns:
Nothing

Definition at line 64 of file common_functions.php.

Referenced by display_add_form().


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