in this line
Response.Write "<td ><input type='text' size=20 name='add1' value= "&rs.fields("Address1")&"></td>"
the rs.fields("Address1") reading only the first word till the space ....
what i nees to write that it will read the all address with all the words in this field?
Something I know!! You should replace the " marks with "" marks whenever inside the Response.Write(" and "), that way the code sends out a quotation mark to be written out instead of thinking it's the end of the Response.Write statement.
thank you for your answer i can't belive it is only a ''mistake...
maybe u have a simple code that can help me with
chackbox or radio it looks like after i chack or unchack it is not going into my db...and stay aas before...
Response.Write "<td width='5%'><input type='radio' size= 10 name='mailing' value= '"&rs("mailingList")&"'></td>"
and in the db
If Request.form("mailing")="CHECKED" then
rs("mailingList")= True
else
rs("mailingList")= False
end if
<%
'----- first request the hidden field to see if this is the first time the page has been displayed
validate = request.form("validate")
'-------Now set an if statement. If the form has been submitted then do the validate else display the form---
if validate = "yes" then
'---------request the checkbox submitted. -----------------
dim thecheckbox
thecheckbox = request.form("checkbox")
'---------i am just writing out the value of the check box, you will not need this in your final code.-------
response.write thecheckbox
'----now your yes/no feild should be set to no/false at the moment so you can either of the following----
'---first way to do this-----------
if thecheckbox = "True" then
response.write "insert this to databse"
SQL = "insert Into tblTableName (myyesnofield) values ('"&thecheckbox&"')"
set InsertSet = youdatabase.Execute(sql)
else
response.write "do nothing"
end if
'-----second way if you need to insert regardless of the checkbox value then you need to do this.
'-----you can't just insert nothing to the field so you will have to manualy set thecheckbox value to false if it wasn't checked
if thecheckbox = "" then
thecheckbox = "False"
end if
'-------now you can do your insert. It doesn't matter if it was checked or not either a true or false will be inserted.
'-------True will obviously set the yes/no field to checked.
SQL = "insert Into tblTableName (myyesnofield) values ('"&thecheckbox&"')"
youdatabase.Execute(sql)
else
%><form action="checkboxexample.asp" method="post">
<input name="Checkbox" type="checkbox" value="True">
Checkbox 1 <BR>
<input name="Sumbit" type="submit" value="submit">
<input name="validate" type="hidden" value="yes">
</form>
<%
end if
%>
Bookmarks