note 21048 deleted from reserved.variables by philip

From: Date: Sun, 08 Dec 2002 02:33:10 +0000
Subject: note 21048 deleted from reserved.variables by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-40513@lists.php.net to get a copy of this message
If you're using things like <select multiple> in an HTML form, you can extract the data from the $_GET / $_POST / $_COOKIE / $_SESSION variables by addressing it as a multi dimensional array. For example; <?php if ( ISSET ( $_GET[submit] ) ) { echo ( $_GET[variable][0] ); } ?> <form action=<?php echo ( $_SERVER[PHP_SELF] ); ?> method="get"> <select name="variable[]" multiple> <option>A <option>B <option>C <option>D </select> <input type="submit" name="submit"> </form> There's more on multi dimensional arrays here: http://www.phpbuilder.com/getit/arrays.php3

« previous php.notes (#40513) next »