This is a very important point to understand, I tried (and
failed) to explain it. I think Leif made it pretty
clear though, here's another :)
// $a can be anything when you call the function
function bar ($a) {
print $a;
}
bar ('Hello World');
bar ($_POST['something']);
Regards,
Philip Ols
You don't need to import the request variables for that to work. The
variable names in the function definition have no relationship to
variables outside of it. Most likely, you're calling with something like:
check_banlist($banlist,$p_email);
but you could also call it with:
check_banlist($vari
Thanks for the vote of confidence. I ended up getting it working with this:
import_request_variables('p', 'p_');
function check_banlist($banlist, $p_email) {
This is what I had been trying to accomplish but was writing it this way:
function check_banlist($banlist, $_POST['email']) {
Maybe you
First, read this:
http://www.php.net/variables.external
Second, assuming you have a PHP version equal to
or greater than 4.1.0 and the method of the form
is POST, you'd do something like this:
$banlist = array('[EMAIL PROTECTED]');
echo check_banlist($banlist, $_POST['email']);
Your ques
I am attempting to modify an old script to support the superglobal
$_POST with register_globals=Off. These register globals are definately
challenging when you are new to php and every example shown anywhere
uses the old method but I guess what doesn't kill you only makes you
stronger.
I am t
5 matches
Mail list logo