Y'all,

I've got a sticky problem that I need to solve. I've just turned on 
register_globals in my PHP php.ini file, and therefore have to run my form 
variables through $_POST:

$variable = $_POST[$variable];
echo $variable;

The problem I'm having is that the script Im trying to refactor worked great 
before I turned register_globals off. The script posts an array, and I can't 
seem to figure out how to $_POST the array.

Here is the script with register_globals OFF:
http://joeykelly.net/materials.php

Here is the script with register_globals ON:
http://redfishnetworks.com/~jkelly/materials.php
Notice the huge nested array at the bottom when you click [SUBMIT]? That's my 
trouble.

In both cases, changing the extension from .php to .phps shows you the source 
code. As you can see, above the form I've tried several attempts to access 
the data, all of which seem to fail.

My question: What am I doing wrong? I suspect that I'm having trouble with 
nested arrays, etc.. The thing that bothers me is that the data is available 
(see the array printout at the bottom?).

If I can't make this work, I'm going to have to resort to munging a bunch of 
scalars ($quantity1, $quantity2, etc.), which to me is an awful kludge that 
I'd rather not sign my name to.

Thanks for any help.


-- 


Joey Kelly
< Minister of the Gospel | Linux Consultant >
http://joeykelly.net


"I may have invented it, but Bill made it famous."
 --- David Bradley, the IBM employee that invented CTRL-ALT-DEL

Reply via email to