Print Page | Close Window

Store checkbox information

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Database Discussion
Forum Description: Discussion and chat on database related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=27195
Printed Date: 28 March 2026 at 7:15am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Store checkbox information
Posted By: cheung126
Subject: Store checkbox information
Date Posted: 31 March 2009 at 10:39am
I would like to create a page to link with a database.
 
It's OK to store "test" by the following code
rsAddComments.Fields("Name") = Request.Form("name")
 
But how about store checkbox?
any reference?
 
Please help!



Replies:
Posted By: cmv
Date Posted: 22 May 2009 at 10:59pm
say your checkbox is named chk1 and has the given value 1
str = Request.Form("chk1")
If str = "" OR NOT IsNumeric(str) Then val = 0 Else val = CInt(str)
alternatively you could use NULL instead of 0 if useful and the field allows NULL
christian


-------------
and remember: a CRAY is the only computer that runs an endless loop in just four hours ...



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net