Re: $_POST to function?

From: Date: Fri, 24 Feb 2006 15:39:35 +0000
Subject: Re: $_POST to function?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-231025@lists.php.net to get a copy of this message
Tanoor Dieng wrote:
Hi, are there some variables in your post array(aka are you sure that $_POST is not empty)? Normally this should works. Tanoor. 2006/2/24, Jason Gerfen <jason.gerfen@scl.utah.edu>:
I am not sure why this is not working. Aren't $_POST vars superglobals? I am trying to pass the $_POST array as an argument to a function and nothing is being returned. Any help is appreciated. return global_template( 3, $_POST, count( $_POST ), $message ); function global_template( $cmd, $args, $num, $message ) { echo "<pre>"; print_r( $args ); echo "</pre>"; } -- Jason Gerfen "When asked what love is: Love is the Jager talking." ~Craig Baldo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Yep, I just double checked the $_POST vars prior to calling the function, ex:
echo "<pre>"; print_r( $_POST ); echo "</pre>"; // This prints everything contained in $_POST without problem return global_template( 3, $_POST, count( $_POST ), $message, NULL ); function global_template( $cmd, $args, $num, $message, $errors ) { echo "<pre>"; print_r( $args ); echo "</pre>"; // This will not display anything in the $args->$_POST array? WTH? } -- Jason Gerfen "When asked what love is: Love is the Jager talking." ~Craig Baldo

« previous php.general (#231025) next »