Syntax

string postget(string $name)

(PHP 4, PHP 5)

$name Name of the POST or GET variable to retrieve.
RETURNS A string from the $_POST or $_GET hash arrays with $name as the key.

What it Does

Retrieves a form variable from the $_GET OR $_POST arrays. These represent querystring and form post variables passed to a script from another page. The function first checks for the existence of a $_POST value and, if found, returns that. Failing that, it will return the value of the $_GET variable.

Function Declaration

function postget($var) {
    return (isset($_POST[$var]) ? $_POST[$var] : $_GET[$var]);
}
 
postget.txt · Last modified: 2008/04/18 14:01 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki