All pastes #389344 Raw Edit

Someone

public text v1 · immutable
·published 2007-03-10 18:03 UTC
rendered paste body
if($_REQUEST['ckbSNProg'] == "checked") {
	$mailSNProg = 'Programming';
}

if($_REQUEST['ckbSNAppCust'] == "checked") {
	$mailSNAppCust = 'Application Customization';
}

if($_REQUEST['SNEComm'] == "checked") {
	$mailSNEComm = 'eCommerce Setup';
}

if($_REQUEST['ckbSNLAMPSetup'] == "checked") {
	$mailLAMPServ = 'LAMP Setup';
}


On the website are a set of checkboxes. These if() statements happen to be in the same order (not that it matters).

If someone picks "ckbSNProg" and the other 3 as well, only ckbSNProg evaluates to try, the rest are skipped even though they have the proper "checked" value.