Right, I understand I should be able to access them.  That's the whole
problem.  They're not there.

I can do one of two things and they magically become available:

1. Don't start the session.

2. Use single variables, not arrays.

#2, however, would create a problem in that I intend to set it up that a
person can have more than one item in their shopping cart.  This hoses that,
as I was planning on having the product ids passed as hidden fields so as
not to have to rely on the session functions to keep items in the shopping


"John Holmes" <[EMAIL PROTECTED]> wrote in message
> > I'm on a server with php version 4.2.1 with register globals on.  The
> main
> > test has been can I access the variables in the script?  Oddly enough,
> if
> > I
> > didn't use an array they are there for me.  Turns out it's only when
> I'm
> > trying to pass an array.  Single variables works fine.  I'm beginning
> to
> > think it's a bug.
> Why are you trying to use an array? The values are there, I imagine you
> are just trying to access them incorrectly.
> > > > <a href=order_form.php?prod_ids[]=9&prod_qtys[]=1>Order</a>
> For that URL, which you should be using quotes around, you'll have
> $_GET['prod_ids'][0] --> 9 and $_GET['prod_qtys'][0] --> 1. Or,
> $prod_ids[0] --> 9, etc, since register_globals is on.
> ---John Holmes...

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to