ZantisWorks
IS-IT--Management
I have had in the past few months, wanted some code to break up strings of text. This time around the text happens to be the Request.ServerVariables("HTTP_REFERER"). My friend wrote some code last night and can't get a hold of him tonight so I thought I'd ask this question as I'm not understanding and not a full blown programmer. He used the querystring in his example and for whatever reason I can't seem to figure out how to test his code. The server variable gets saved into a database and then I want to create a code that pulls that string back from the database on a different asp page that breaks up what was saved in the database. So obviously I wouldn't be using the ServerVariable directly. The data gets pulled into VmemReferer variable. Which when I changed the Request.Querystring to that variable it throws errors. I know I know, this is an easy one but still I'm a basic programmer and don't understand why. So here is the code that my friend wrote.
<html>
<body>
<%
dim value
dim valueTable
dim i
dim thePos
'response.Write(Request.QueryString)
For Each item In Request.QueryString
myvalue = Request.QueryString(item)
Response.Write(item & " = " & myvalue & "<br>")
thepos = cstr(instr(myvalue,"+"))
Response.write(thePos + "<br>")
if instr(myvalue," ") > 0 then
Response.write("got here <br>")
valueTable = split(myvalue," ")
' Response.Write(len(Valuetable))
for each myitem in valuetable
Response.Write(item & " = " & myItem & "<br>")
next
end if
Next
%>
</body>
</html>
Thanks in advance for your help.
<html>
<body>
<%
dim value
dim valueTable
dim i
dim thePos
'response.Write(Request.QueryString)
For Each item In Request.QueryString
myvalue = Request.QueryString(item)
Response.Write(item & " = " & myvalue & "<br>")
thepos = cstr(instr(myvalue,"+"))
Response.write(thePos + "<br>")
if instr(myvalue," ") > 0 then
Response.write("got here <br>")
valueTable = split(myvalue," ")
' Response.Write(len(Valuetable))
for each myitem in valuetable
Response.Write(item & " = " & myItem & "<br>")
next
end if
Next
%>
</body>
</html>
Thanks in advance for your help.