Re: Getting results from Select Multiple HTML tag

From: Date: Tue, 06 Jan 2004 04:20:33 +0000
Subject: Re: Getting results from Select Multiple HTML tag
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-173819@lists.php.net to get a copy of this message
Hi, Tuesday, January 6, 2004, 2:05:47 PM, you wrote: TL> Hi, TL> Ÿ Ž® \? TL> Gp{}5ñ¦http://www.php.net/manual/en/faq.html.php#faq.html.select-multiple TL> I read that. Doesn't work in php since the whole register_globals TL> thing. Now, when I get the results from a form, they're all in a TL> $_POST[] array. Example. TL> When I have a <select name="test" MULTIPLE> TL> I would have to access the values of the "test" field like this: TL> count($_POST['test']); TL> But since I have to have the [] in the name="<select name="test[]" MULTIPLE>>" ()part, I get parse errors when trying to read it: TL> ex: count($_POST['test[]']); TL> That doesn't even look right. Anyone understand what I'm tryin to get TL> at? Any help would be great. TL> Best Regards, TL> -- TL> Tyler Longren TL> J.D. Web Services, L.C. try $_POST['test'][] or copy it to another array $test = $_POST['test']; print_r($test); -- regards, Tom

« previous php.general (#173819) next »