I just found out something about PHP that makes me thankful that I don't use
it.
Someone on another list asked a question about multiple checkboxed with the
same name. For example:
<INPUT NAME="ck" TYPE="CHECKBOX" VALUE="example1">example1<BR />
<INPUT NAME="ck" TYPE="CHECKBOX" VALUE="example2">example2<BR />
<INPUT NAME="ck" TYPE="CHECKBOX" VALUE="example3">example3<BR />
In Coldfusion, if you check all three of these boxes, you'd wind up with a
form variable named "ck", with a value of "example1,example2,example3".
Apparently in PHP, with a setup as above, you'd only wind up with the LAST
value in that set "example3". To gain access to all values in PHP you have
to set the name of the form element to "ck[]", which is the shortcut for
creating an array.
<input name="ck[]" type="checkbox" value="1">example1<br />
<input name="ck[]" type="checkbox" value="2">example1<br />
<input name="ck[]" type="checkbox" value="3">example1<br />
Then do stuff with it to get it into list format:
$ck='';
foreach($_POST[ck] as $item) {
$ck .=$item."|";
}
This just makes me unbelievably thankful for Coldfusion's simplicity.
<!----------------//------
andy matthews
web developer
certified advanced coldfusion programmer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--------------//--------->
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four
times a year.
http://www.fusionauthority.com/quarterly
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:255844
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4