note 15584 added to function.require
| From: | steveFUNNYSYMBOLpetabitFULLSTOPcom at php2 dot chek dot com | Date: | Tue, 18 Sep 2001 17:58:30 +0000 |
| Subject: | note 15584 added to function.require | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-18136@lists.php.net to get a copy of this message | ||
A working require or include that passes POST variables to a remote form.
(VERY IMPORTANT)
<?php
// First capture all the post variables and pass them on through the
// kludgey "GET-like" mechanism of PHP
while(list($key2,$val2) = each($HTTP_POST_VARS)) {
$val = urlencode($val2);
$tmp .= $key2. "=" . $val . "&";
}
// Remove that last "&"
$VARS= substr($tmp,0,strlen($tmp)-1);
$DOCROOT="http://yourserver/";
$REMOTE = $DOCROOT."/remote.php?". $VARS;
require ($REMOTE);
?>
http://it.php.net/manual/en/function.require.php