# How to send the value of checkbox to database using asp

**URL:** <https://forum.kirupa.com/t/how-to-send-the-value-of-checkbox-to-database-using-asp/29950>\
**Category:** Uncategorized\
**Created:** [September 2, 2003, 11:42am UTC](https://forum.kirupa.com/t/how-to-send-the-value-of-checkbox-to-database-using-asp/29950 "2003-09-02T11:42:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SBUH](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@SBUH](https://forum.kirupa.com/u/SBUH)\
**Post date:** [September 2, 2003, 11:42am UTC](https://forum.kirupa.com/t/how-to-send-the-value-of-checkbox-to-database-using-asp/29950/1 "2003-09-02T11:42:59Z")

</div>

hello, I have situation like, before the user make tick on the checkbox, it is shown the checkbox. And after the user tick the checkbox, the value “1” send to the database and output the value “1” there and no more checkbox shown.

I have code like

```php

 <input name="kymitex" type="checkbox" 
	 <%dim kymitex,bu,shipping
		      If (rs("kymitex")="1") then
		  	  Response.write(rs("kymitex")) 
			 end if 
			%>
value="1">

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 2, 2003, 12:39pm UTC](https://forum.kirupa.com/t/how-to-send-the-value-of-checkbox-to-database-using-asp/29950/2 "2003-09-02T12:39:25Z")

</div>

maybe it is better I explain more about my code. I want to output the results on screen and have a recordset. Then in one column is this checkbox. I would like to show the checkbox without tick if the value sent to database is “0”,else if it is “1” then the checkbox is checked as the output.

Now I couldnot send the value of “1” to database.

```php

<form name="confirm" method="post" action="administrator_ky.asp">
     <td><div align="center"><font color="#00CCFF" size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
            <input name="kymitex" type="checkbox" value="1"
            <% If rs("kymitex")="1" then
                  Response.write("Checked") 
                end if 
                 %> >
         </font></div></td>
      <td><div align="center"><font color="#00CCFF" size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
          <input name="submit" type="submit" value="Done">
         </font></div></td>
   </form>
   <% 
     kymitex=Request.form("kymitex")
    
     sql="update Tshirtproduct set kymitex='"&kymitex&"'"     
     rs.MoveNext%>

```

It seems the update of the table doesn’t function. What should I modify the code then? Thanks a lot !!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 2, 2003, 1:24pm UTC](https://forum.kirupa.com/t/how-to-send-the-value-of-checkbox-to-database-using-asp/29950/3 "2003-09-02T13:24:02Z")

</div>

your not executing the SQL, i replied to a post you posted before, compare the code
