-rw------- 1 rem user 2587 Feb 10 2007 h4int.php
^ ^ Note read permission for group and other is *not* needed!
** Start of listing of h4int.php **
PHP Test
In PHP, it isn't necessary to do any work to get the GET or POST form contents
decoded and separated, because the PHP server does all that work for you,
and also collects
all cookies your browser has sent to the server, putting each set of key=value
pairs in appropriately-named associative arrays:
$_POST = '; print_r($_POST);
echo '$_COOKIE = '; print_r($_COOKIE);
?>
PHP also merges GET, POST and COOKIE data into a single associative array:
$_REQUEST = '; print_r($_REQUEST);
?>
Now this PHP script will start the new stuff under development...
\n";
return("Stub.");
}
function keyGetCheckNumTell($key) {
$sval = $_REQUEST[$key];
echo "For key=["; echo $key; echo "], val=["; echo $sval;
echo "], checking...
\n";
$chkres = strCheckNum($sval);
$matres = preg_match ("/^$/", $chkres);
if ($matres==1) {
echo "Good.";
$n = 0+$sval;
echo(" The number is ["); echo($n); echo("].\n");
echo("The next larger numbers are: "); echo($n+1); echo(" ");
echo($n+2); echo(" "); echo($n+3); echo("
\n");
}
else {
echo "Bad: "; echo $chkres; echo "
\n";
}
}
keyGetCheckNumTell('num1');
keyGetCheckNumTell('num2');
keyGetCheckNumTell('num3');
keyGetCheckNumTell('num4');
keyGetCheckNumTell('num5');
keyGetCheckNumTell('num6');
keyGetCheckNumTell('num7');
keyGetCheckNumTell('num8');
?>
** End of listing of h4int.php **