Code help on a multi select list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux