[PHP] Associative array key as a variable

2002-02-23 Thread ejfs
Hi. I have the following PHP program executed from an HTML form where I pass the associative array key name as a variable: ? function show($name) { $cnt = count($HTTP_POST_VARS[$name]); echo Count for $name is $cnt; echo br /; } show(countries); show(cities); ? The result is always 0.

[PHP] HTTP_POST_VARS problem

2002-02-07 Thread ejfs
Hi. I'm a newbie at this and am having problems understanding how this works. I have a form with method=post. The server program does display REQUEST_STRING as I expect (e.g., choice=yes but displaying HTTP_POST_VARS[choice] is null). However, displaying HTTP_GET_VARS[choice] does display yes.

Re: [PHP] HTTP_POST_VARS problem

2002-02-07 Thread ejfs
Please ignore my question - I just figured it out. I had the method=post in the input type=submit tag rather than in the form tag. It works! However, if one has an HTML select/option menu scrolling list with multiple selections, how does one get the number of values for the same name with