Some error Check It
Posted: Sat Aug 16, 2003 12:08 am
Try to run this code.
-------test.php----
<?
include_once ('httpio.inc');
$formVars = HttpPrm();
$userid = $formVars["userid"];
$password = $formVars["password"];
?>
----END test.php---
----httpio.inc--
<?
function HttpPrm( )
{
global $HTTP_GET_VARS,$HTTP_POST_VARS,$HttpPost;
if ( count($HTTP_POST_VARS) ) return ( $HTTP_POST_VARS );
if ( count($HTTP_GET_VARS) ) return ( $HTTP_GET_VARS );
return ( $HTTP_POST_VARS );
}
function HttpVar( $vKey )
{
global $HTTP_GET_VARS,$HTTP_POST_VARS,$HttpPost;
if ( count($HTTP_POST_VARS) ) return ( $HTTP_POST_VARS[$vKey] );
if ( count($HTTP_GET_VARS) ) return ( $HTTP_GET_VARS[$vkey] );
return ( $HTTP_POST_VARS[$vkey] );
}
?>
--end httpio.inc---
-------test.php----
<?
include_once ('httpio.inc');
$formVars = HttpPrm();
$userid = $formVars["userid"];
$password = $formVars["password"];
?>
----END test.php---
----httpio.inc--
<?
function HttpPrm( )
{
global $HTTP_GET_VARS,$HTTP_POST_VARS,$HttpPost;
if ( count($HTTP_POST_VARS) ) return ( $HTTP_POST_VARS );
if ( count($HTTP_GET_VARS) ) return ( $HTTP_GET_VARS );
return ( $HTTP_POST_VARS );
}
function HttpVar( $vKey )
{
global $HTTP_GET_VARS,$HTTP_POST_VARS,$HttpPost;
if ( count($HTTP_POST_VARS) ) return ( $HTTP_POST_VARS[$vKey] );
if ( count($HTTP_GET_VARS) ) return ( $HTTP_GET_VARS[$vkey] );
return ( $HTTP_POST_VARS[$vkey] );
}
?>
--end httpio.inc---