Here is a script for this..
<?
//A working require or include that passes POST variables to a remote form.
//(VERY IMPORTANT)
// First capture all the post variables and pass them on through the
// kludgey "GET-like" mechanism of PHP
if ($REQUEST_METHOD=="POST")
{
while(list($key2,$val2) = each($HTTP_POST_VARS)) {
$val = urlencode($val2);
$tmp .= $key2. "=" . $val . "&";
}
// Remove that last "&"
$VARS= substr($tmp,0,strlen($tmp)-1);
if ($SERVER_PORT<>"80"){$PORT=":$SERVER_PORT";}else{$PORT="";}
$REMOTE = "http://$SERVER_NAME$PORT"."$SCRIPT_NAME?".$VARS;
//echo $REMOTE;
require ($REMOTE);
}
if ($REQUEST_METHOD=="GET")
{
while(list($key2,$val2) = each($HTTP_GET_VARS)) {
$val = urlencode($val2);
$tmp .= $key2. "=" . $val . "&";
}
// Remove that last "&"
$VARS= substr($tmp,0,strlen($tmp)-1);
if ($SERVER_PORT<>"80"){$PORT=":$SERVER_PORT";}else{$PORT="";}
$REMOTE = "http://$SERVER_NAME$PORT"."$SCRIPT_NAME?".$VARS;
// echo $REMOTE;
require ($REMOTE);
}
?>