|
can anyone tell me why this code doesn`t work? Is is a data type problem? If so how can I fix it
Dim cc_type
if cc_type = "American Express" then
ect.
|
|
|
There is nothing wrong with the code you posted. If the variable cc_type did indeed contain the value "American Express", that line would equate to TRUE. What you should do is something like this before this line to test the values:
Response.Write("<h2>|" & cc_type & "|</h2>")
Response.Flush
Response.End
The pipes will let you see if there are spaces before or after your value. Because "American Express " does not equal "American Express".
You can do this
if CStr(cc_Type) = "American Express", but this is not your problem here. You will commonly need to explicitly convert when dealing with integers such as
If CInt(cc_id) = 1 then ...
|
|
|
|
|
|
|
|
|
|
|
|