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
<input name="kymitex" type="checkbox"
<%dim kymitex,bu,shipping
If (rs("kymitex")="1") then
Response.write(rs("kymitex"))
end if
%>
value="1">
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.
<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 !!