I'm passing about 125 million values from page1.php to page2.php, using the POST method.
I'm sure there's probably an environmental variable or array that stores all these values together. Can you tell me which one, and how to work with it?
TIA.
Printable View
I'm passing about 125 million values from page1.php to page2.php, using the POST method.
I'm sure there's probably an environmental variable or array that stores all these values together. Can you tell me which one, and how to work with it?
TIA.
125 million varaibles? man what a waste
print_r($_POST);
that will print out ever single one......
Well, not 125 million.. I was being rhetorical, I think.
I just meant 'a lot of values,' and instad of doing a
$varname = $_POST['varname'];
for each value passed, I wanted to work with the environmental variables.
print_r() prints it all out. Can't I get access the array?
well you could do it like this
but all that does is makes all the POSTed varaibles the real names.PHP Code:foreach ($_POST as $key => $val) {
$$key = $val;
}
so if you have a variable sent from the form like this
$_POST['name'] and that little loop makes it so you can use it like this $name
but you still have to know what each variable name is, nothing around that.
OK, Thanks for the info.
I don't understand everyone's problem with using $_POST['varname'] in their code...
I'm doing better than that! I'm trying to get the code to do all the $_POSTing for me! :)Quote:
Originally posted by The Hobo
I don't understand everyone's problem with using $_POST['varname'] in their code...
Uh huh.