Code help on a multi select list

From: Date: Fri, 29 Oct 2004 13:13:27 +0000
Subject: Code help on a multi select list
Groups: php.general 
Request: Send a blank email to php-general+get-200623@lists.php.net to get a copy of this message
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'] ) ); }

« previous php.general (#200623) next »