Click to See Complete Forum and Search --> : Dont show variables passed using querystring???
turfbult
Mar 8th, 2001, 02:10 PM
Hello,
When passing variables from one page to the next using querystring eg....
"MembersCenter.asp?uid=123&pwd=mypassword" - the variables now show in the browsers titlebar.
Is there a way to get it NOT to show there!!??
I know this might not be the best way to send info like uid/pwd, but in the application I'm using
it, it really does not have to be a major "secret". I would however like it NOT to display.
Thanks all,
T
sorry, Wish I knew. I just wanted to post so I will get notified if this question gets answered. I have been
Encrypting my query strings to get around this problem so far.
Cander
Mar 8th, 2001, 02:31 PM
2 ways. Use frames
Or do a form POST method and use request.form instead
compuGEEK
Mar 8th, 2001, 03:13 PM
You could also encrypt the URL.
compuGEEK
Mar 9th, 2001, 10:16 AM
Hey Turfbult,
This is a routine that I used. It's not my code - I think I acquired it from either a VBWorld post or 4guysfromRolla. Anyway, it does the trick.
URLEncode function:
Public Function URLEncode(Tx As String) As String
Const ZERO_PERCENT As String = "%0"
Const PERCENT As String = "%"
Dim strTemp As String
Dim strChar As String
Dim nTemp As Integer
Dim nAsciiVal As Integer
Dim Str As String
Str = Trim$(Tx)
If Len(Str) = 0 Then Exit Function
For nTemp = 1 To Len(Str)
nAsciiVal = Asc(Mid(Str, nTemp, 1))
If ((nAsciiVal < 123) And (nAsciiVal > 96)) Then
strTemp = strTemp & Chr$(nAsciiVal)
ElseIf ((nAsciiVal < 91) And (nAsciiVal > 64)) Then
strTemp = strTemp & Chr$(nAsciiVal)
ElseIf ((nAsciiVal < 58) And (nAsciiVal > 47)) Then
strTemp = strTemp & Chr$(nAsciiVal)
Else
strChar = Trim$(Hex$(nAsciiVal))
If nAsciiVal < 16 Then
strTemp = strTemp & ZERO_PERCENT & strChar
Else
strTemp = strTemp & PERCENT & strChar
End If
End If
Next
URLEncode = strTemp
End Function
Good luck!
CG
Just make sure you put that encryption code into a dll. If you plan to code it straight onto your ASP you will run into problems with converting data types. all vars in an asp are variant.
"strTemp = strTemp & -->Chr$<--(nAsciiVal)"
At least I have had probles with it. I havn't actually tried you code.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.