> Warning: Invalid argument supplied for foreach() in
> c:\apache\htdocs\or_6.4.php on line 15
do a print_r on $_POST to see what is in the array.
> <form method="post" action="eat.php">
> <select name="lunch[]" multiple>
> <option value="pork">BBQ Pork Bun</option>
> <option value="chicken">Chicken Bun</option>
> <option value="lotus">Lotus Seed Bun</option>
> <option value="pork">Bean Paste Bun</option>
> <option value="chicken">Bird-Nest Bun</option>
> </select>
> <br><br>
> <input type="submit" name="submit">
> </form>
> Selected buns:
> <br>
> <?
> foreach ($_POST['lunch'] as $choice)
> {
> print "You want a $choice bun.<br>";
> }
> ?>
looks like you are posting to another page, eat.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php