| | |
string not working
Please support our ASP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: May 2004
Posts: 4
Reputation:
Solved Threads: 0
I have the following checkbox on my site but it dosen't work, tried to solve it before but still having trouble.
this is the code from my first page
<P>Do you want to take pets with you?
<INPUT type=CHECKBOX name = "PETS" value = "Y">Yes<br>
This is the code from my second page
IF strPETS = "Y" THEN strSQLLOC = strSQLLOC & " AND fldPETS = 'Y' " ELSE strSQLLOC = strSQLLOC
Please help!!!
this is the code from my first page
<P>Do you want to take pets with you?
<INPUT type=CHECKBOX name = "PETS" value = "Y">Yes<br>
This is the code from my second page
IF strPETS = "Y" THEN strSQLLOC = strSQLLOC & " AND fldPETS = 'Y' " ELSE strSQLLOC = strSQLLOC
Please help!!!
•
•
•
•
Originally Posted by squirrelj
I have the following checkbox on my site but it dosen't work, tried to solve it before but still having trouble.
this is the code from my first page
<P>Do you want to take pets with you?
<INPUT type=CHECKBOX name = "PETS" value = "Y">Yes<br>
This is the code from my second page
IF strPETS = "Y" THEN strSQLLOC = strSQLLOC & " AND fldPETS = 'Y' " ELSE strSQLLOC = strSQLLOC
Please help!!!
ASP Syntax (Toggle Plain Text)
<% IF request.form("PETS") = "Y" THEN strSQLLOC = strSQLLOC & " AND fldPETS = 'Y' " response.write("YOU CHECKED THE BOX") ELSE strSQLLOC = strSQLLOC response.write("BOX NOT CHECKED") end if %>
•
•
Join Date: Jul 2004
Posts: 32
Reputation:
Solved Threads: 1
Actually, it's a string value, and so is everything send via an HTTP GET or POST.
It is up to you, the developer to cast the strings to explicit types.
You must assign the value of the posted form field to your variable, strpets.
Either that, or do this:
It is up to you, the developer to cast the strings to explicit types.
You must assign the value of the posted form field to your variable, strpets.
Either that, or do this:
ASP Syntax (Toggle Plain Text)
IF request.form("PETS") = "Y" THEN strSQLLOC = strSQLLOC & " AND fldPETS = 'Y' "
![]() |
Similar Threads
- Coverting a string to a byte array (Visual Basic 4 / 5 / 6)
- Array String not working? (JSP)
Other Threads in the ASP Forum
- Previous Thread: CursorType help
- Next Thread: Error message when running ASP email script
| Thread Tools | Search this Thread |
archive asp asp.net aspandmssqlserver2005 aspandmssqlserver2005connection aspconnection connection database databaseconnection dreamweaver excel fso iis msmsql mssql2005 mssqlserver2005 mssqlserver2005andasp mssqlserverandasp opentextfile record searchbox selectoption single specfic sqlserver sqlserverconnection windows7






