| re: Why wont this access an array???
Nick wrote:[color=blue]
> Can someone please tell me how to access elements from a multiple
> selection list? From what ive read on other posts, this is correct. I
> keep getting an "Undefined variable" error though...
>
> Form page********************************************** **************
> <form action="/process.php" method="get" name="formOne" id="formOne">
> <select name="owner[]" size="6" multiple id="owner[]">
> <option value="one">one</option>
> <option value="two">two</option>
> <option value="three">three</option>
> </select>
> <input type="submit" name="Submit" value="Submit">
> </form>[/color]
[color=blue]
> Process page********************************************** ************
> for($i=0; $i < count($owner); $i++) {
> echo $owner[$i];
> }[/color]
Just a hunch... Have you defined the variable $owner? If not, you are
probably depending on register_globals to being "on", which it may not
be in your system. Try using the following:
$owner = $_GET["owner"];
before your for... loop.
HTH
--
Marius |