Sorry... Forgot the sql part:
Code like below will produce a form field variable of Accomidations=1,3
in the checkTheBoxes.cfm if Hotel and Bed and Breakfast are both
checked.
<html>
<head>
<title>Select Multi Boxes</title>
</head>
<body>
<form name="chkBoxes" action="checkTheBoxes.cfm" method="post">
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td>Accomidation Type: Check as many as you want.</td> </tr> <tr>
<td><input name="Accomidations" type="Checkbox" value="1">1.
Hotel</td> </tr> <tr>
<td><input name="Accomidations" type="Checkbox" value="2">2. Guest
House</td> </tr> <tr>
<td><input name="Accomidations" type="Checkbox" value="3">3. Bed and
Breakfast</td> </tr> <tr>
<td><input name="Accomidations" type="Checkbox" value="4">4. Self
Catering</td> </tr> <tr>
<td> </td>
</tr>
<tr>
<td><input name="submit" type="Submit" value="Submit"></td> </tr>
</table> </form>
</body>
</html>
Here is the checkTheBoxes.cfm...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Check The Boxes</title>
</head>
<body>
<cfoutput>
<cfif isDefined("form.Accomidations")>
<cfloop list="#form.Accomidations#" index="x">
<cfquery datasource="blah" name="insertAccomidation">
insert into tblAccomidations (personKey,
accomitationId) values(pid,x)
</cfquery>
</cfloop>
</cfif>
</cfoutput>
</body>
</html>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
http://www.cfhosting.com
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4