On 7/27/00, mohammed jakda penned:
>Hi,
>I have a single checkbox field on a form for a user to check or uncheck if
>they want to subscribe to a newsletter, the problem I'am having is that if
>the user unchecks it, then my insert query does not record anything such as
>no or 0 in my Dbase column, whereas as if it is left at the default checked
>it store the value "yes" in the Dbase...
>Does anyone know how to make a value be stored in the Dbase when a user
>unselects the checkbox???
>
><td><INPUT type="Checkbox" NAME="field1" value="yes"checked="yes"></td>
<cftransaction>
<cfquery name="qInsert" datasource="landlord2">
insert into table1
(Field1)
values
(<cfif isdefined('form.field1')>1<cfelse>0</cfif>)
</cfquery>
</cftransaction>
--
Bud Schneehagen - Tropical Web Creations
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.