// getVar - Version 1.1 // Snippet by Henning Mersch // See http://www.henning-mersch.de/snippets.html // Open Source in terms of the GPLv2; see http://www.gnu.org/licenses/gpl.html // This is a workaround for forwarding the parameter of a document call to a URL within a document. // example usage: [ [getVar?var=myhttpgetid] ] $var = isset($var)?$var:'id'; $value = isset($_GET[$var])?$_GET[$var]:0; $value = isset($_POST[$var])?$_POST[$var]:$value; return $value;