Re: HTTP_POST_VARS: Data there, but can't get to it
| From: | Tom Rogers | Date: | Sat, 10 Nov 2001 07:23:43 +0000 |
| Subject: | Re: HTTP_POST_VARS: Data there, but can't get to it | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-74084@lists.php.net to get a copy of this message | ||
Hi
Your whatdo's will be whatdo0 whatdo1...whatdox
You need to do like this if I understand what you are doing :)
$row=0;
while($row < $numofrows):
$var = "whatdo".$row;
$whatdo = $submitted_vars["$var"];
//do whatever with $whatdo
.
$row ++;
endwhile;
Tom
At 09:41 AM 10/11/01, Lara J. Fabans wrote:
Hi, I'm having some difficulties accessing HTTP_POST_VARS The original form has a table where each row has a set of 3 radio buttons name="whatdo<?php print $x?>[]" where $x is the row counter. (I'm using PHP to pull info into a table, then the user manipulates the info, and it places the info into 2 other tables depending upon what the choice is for the 3 radio buttons). So, on submit, it reloads the page, and I pull in all of the areas. All work except the radio buttons. I've tried: $submitted_vars = $HTTP_POST_VARS; $whatdo = $submitted_vars[whatdo]; --- and $whatdo = $HTTP_POST_VARS["whatdo"]; -- but when I do a print_r($whatdo) it's blank When I do a print_r($HTTP_POST_VARS) I get Array ( [whatdo] => Array ( [0] => load [1] => delete), [other stuff]....) What am I doing wrong :-) How do I access this data? It's so frustrating since all the rest of the postvars are working, and I can see that the data's there in the HTTP_POST_VARS....I just can't get to it. (pun not intended) Thanks, Lara --------------------- Lara J. Fabans Lodestone Software, Inc lara@lodestone-sw.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net