Re: Dummy question about gettion "select option" choosen

From: Date: Mon, 30 May 2005 14:33:10 +0000
Subject: Re: Dummy question about gettion "select option" choosen
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-215993@lists.php.net to get a copy of this message
Kim Madsen wrote:
-----Original Message----- From: Jochem Maas [mailto:jochem@iamjochem.com] Sent: Monday, May 30, 2005 10:28 AM To: Mário Gamito
I now have this code in a form: --------------------------- <select name="interesse[]"> <option>1</option> <option>2</option> <option>3</option> (etc...) </select>
if the form containing this element is posted then the following will so you what exactly is posted: var_dump( $_POST['interesse'] ); which should show you an array of one or more items, which either come from many form elements named 'interesse[]' OR from a single element named 'interesse[]' where that element is multiselect (in which case the definition should be something like: <select name="interesse[]" multiple> or <select name="interesse[]" multiple="multiple">
I haven´t tried it but do You think that the multiple would work without a value in the option tag? <option>3</option> Should be <option value="3">3</option> -- Med venlig hilsen / best regards ComX Networks A/S Kim Madsen Systemudvikler/Systemdeveloper it *might* work, but it *should not* work.


« previous php.general (#215993) next »