scripter73
Programmer
Hi,
I have the following snippet that searches the http_referer screen and if it has certain values (i.e., called from within the application), then don't update a hit counter.
However, I keep getting a syntax error. It happens at my else statement where I'm trying to include the counter file. If I take the include out of the If condition, it works fine. I also get an error if I say ..& <!-- #include --> ....
<%
dim previous
previous = Request.ServerVariables("HTTP_REFERER"
'previous now contains the value of the previous script
response.write "Value of var = " & previous
if InStr(1, previous,"classifieds" , VBTextCompare) then
response.write " In string, therefore don't count" & "<br>"
elseif InStr(1, previous,"about" , VBTextCompare) then
response.write " In string, therefore don't count" & "<br>"
elseif InStr(1, previous,"directory" , VBTextCompare) then
response.write " In string, therefore don't count" & "<br>"
elseif InStr(1, previous,"about" , VBTextCompare) then
response.write " In string, therefore don't count" & "<br>"
elseif InStr(1, previous,"advertise" , VBTextCompare) then
response.write " In string, therefore don't count" & "<br>"
else
response.write " You are visitor number " & #INCLUDE FILE="counter.asp" & "to this site."
end if
%>
Any help is appreciated.
Thanks,
scripter73
Change Your Thinking, Change Your Life.
I have the following snippet that searches the http_referer screen and if it has certain values (i.e., called from within the application), then don't update a hit counter.
However, I keep getting a syntax error. It happens at my else statement where I'm trying to include the counter file. If I take the include out of the If condition, it works fine. I also get an error if I say ..& <!-- #include --> ....
<%
dim previous
previous = Request.ServerVariables("HTTP_REFERER"
'previous now contains the value of the previous script
response.write "Value of var = " & previous
if InStr(1, previous,"classifieds" , VBTextCompare) then
response.write " In string, therefore don't count" & "<br>"
elseif InStr(1, previous,"about" , VBTextCompare) then
response.write " In string, therefore don't count" & "<br>"
elseif InStr(1, previous,"directory" , VBTextCompare) then
response.write " In string, therefore don't count" & "<br>"
elseif InStr(1, previous,"about" , VBTextCompare) then
response.write " In string, therefore don't count" & "<br>"
elseif InStr(1, previous,"advertise" , VBTextCompare) then
response.write " In string, therefore don't count" & "<br>"
else
response.write " You are visitor number " & #INCLUDE FILE="counter.asp" & "to this site."
end if
%>
Any help is appreciated.
Thanks,
scripter73
Change Your Thinking, Change Your Life.