I have a series of functions I am working on. They are complimentary as in when one is done, it calls the next. Each function is declared on a separate page and the previous page just includes the next page to call the next function.
On one function, it shows checkboxes, now I need that post data to be available for the next function, how do I do that? I can't put a function for the action on the form can I? if not, what's the best way to do this??
passing post data through a function?
well return it?
I mean for instance... you can just pass it on...
function showPost($post) {
echo $post;
}
showPost($_POST);
but for some reason if you have the $_POST information inside of a function and want to return an array of it or just that... then return it
function showPost($post) {
return $post;
}
Should work...
hmm, i dunno if that's what I'm looking for. i need somewhere to point the form to submit the post data, whcih should be the next function, but i don't think I can do that
ACTUALLY!!!
here is something you can do!!
whatever the value of the post is...
you can actually call it with the value of a variable.... like this!
lets say: $variable = "myFunction";
You can call "myFunction()" by doing this
$variable();
so if:
function myFunction() {
echo "YOU CALLED THE FUNCTION";
}
then thats what would be printed to the screen, That might help you with calling a function with the post data.... k? Tell me if it will work... it should.