|
-
Jun 25th, 2003, 05:08 PM
#1
All the $_POST variables in an array
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.
-
Jun 29th, 2003, 01:36 AM
#2
Frenzied Member
125 million varaibles? man what a waste
print_r($_POST);
that will print out ever single one......
-
Jun 29th, 2003, 11:04 AM
#3
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?
-
Jun 29th, 2003, 03:23 PM
#4
Frenzied Member
well you could do it like this
PHP Code:
foreach ($_POST as $key => $val) {
$$key = $val;
}
but all that does is makes all the POSTed varaibles the real names.
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.
-
Jun 30th, 2003, 12:50 AM
#5
-
Jul 1st, 2003, 12:02 PM
#6
Stuck in the 80s
I don't understand everyone's problem with using $_POST['varname'] in their code...
-
Jul 2nd, 2003, 04:16 AM
#7
Originally posted by The Hobo
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!
-
Jul 2nd, 2003, 09:00 PM
#8
Stuck in the 80s
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|