\n"); } else { header("Content-type: text/html; charset=utf-8"); } // Evaluate the Request $referer = "Unknown Referer\n"; if (isset($_SERVER['HTTP_REFERER'])) { $referer = "{$_SERVER['HTTP_REFERER']}"; } $method = "Unspecified Request Method\n"; if (isset($_SERVER['REQUEST_METHOD'])) { $method = $_SERVER['REQUEST_METHOD']; } ?> Echo Form Data

The web page at has sent the following form data:

No GET/POST parameters were passed to this script.

\n"; } else { echo "

The Request Method is $method.

\n"; $num_param = ($method === 'GET') ? $num_get : $num_post; $copula = ($num_param === 1) ? 'is' : 'are'; $plural = ($num_param === 1) ? '' : 's'; echo "

There $copula $num_param $method parameter$plural.

\n"; $num_other = ($num_get + $num_post) - $num_param; echo "\n"; echo "\n"; echo "\n"; $params = ($method === 'GET') ? $_GET : $_POST; while ($param = each($params)) { if (is_array($param['value'])) { $val = $param['value']; $n = count($val); $name = str_replace('&', '&', $param['key']); echo "\n"; } else { $p = str_replace('&', '&', nl2br($param['value'])); echo "\n"; } } echo "
$method Parameter$plural
NameValue(s)
$name\n"; while ($value = each($val)) { $index = str_replace('&', '&', $value[0]); $thisValue = str_replace('&', '&', $value[1]); echo "[$index]: $thisValue
\n"; } echo "
$param[key]$p
\n"; if ($num_other > 0) { $copula_other = ($num_other === 1) ? 'is' : 'are'; $plural_other = ($num_other === 1) ? '' : 's'; $method_other = ($method === 'GET') ? 'POST' : 'GET'; echo "

There $copula_other also $num_other $method_other parameter$plural_other!

\n"; echo "\n"; echo "\n"; echo "\n"; $params = ($method === 'GET') ? $_POST : $_GET; while ($param = each($params)) { if (is_array($param['value'])) { $val = $param['value']; $n = count($val); $name = str_replace('&', '&', $param['key']); echo "\n"; } else { $p = str_replace('&', '&', nl2br($param['value'])); echo "\n"; } } echo "
$method_other Parameter$plural_other
NameValue(s)
$name\n"; while ($value = each($val)) { $index = str_replace('&', '&', $value[0]); $thisValue = str_replace('&', '&', $value[1]); echo "[$index]: $thisValue
\n"; } echo "
$param[key]$p
\n"; } } ?>