|
I don't have a clue what it is you are talking about with multiple selects. So we cannot tell you if its right or not.
exit would go where you want to halt processing. If you don't want to halt processing than you don't need to exit. If all select need to be processed, than you would not want to issue a die since you want to process all blocks before redirecting.
If you have more options to select from, than simply add cases for them to match in the switch. That is what makes it so flexible, it is an if/elseif/else logic as it applies to a single item for comparison. It cannot perform non-equal comparisons though (but you can use the result of comparator type functions to use as a switch result).
As for JS, it is "fun" to use it, but is unreliable for any validation. Any client controlled controlled language should automatically deem input as dirty when provided to a server side language. With something such as this issuing redirection to remote locations, I would not see a need to concern myself about client added in options, so JS is a potentially viable solution.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
|