RE: [PHP] Code help on a multi select list

From: Date: Fri, 29 Oct 2004 13:23:22 +0000
Subject: RE: [PHP] Code help on a multi select list
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-200626@lists.php.net to get a copy of this message
I would choose javascript to to check this -----Original Message----- From: Stuart Felenstein [mailto:stuart4m@yahoo.com] Sent: vrijdag 29 oktober 2004 15:13 To: php-general@lists.php.net Subject: [PHP] Code help on a multi select list I want to do a server side trap if a user selects more from a mult select list then allowed. Just unsure and didn't find any examples. Seems people rely more on javascript these days. So here is how I grab the array: if ( is_array( $_REQUEST['LurkerIndustry'] ) ) { $_SESSION['l_industry'] = array_unique( array_merge( $_SESSION['l_industry'], $_REQUEST['LurkerIndustry'] ) ); } here is my somewhat hazy notion: if ( is_array( $_REQUEST['LurkerIndustry'] ) ) { $_SESSION['l_industry'] = array_unique( if $l_industry > 5 ( Here I'm guess I need to redirect back to page with and error message) else array_merge( $_SESSION['l_industry'], $_REQUEST['LurkerIndustry'] ) ); } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#200626) next »