Forums
This topic is locked
Cookies wont save
Posted 29 Jan 2003 04:18:46
1
has voted
29 Jan 2003 04:18:46 Sven Hentschel posted:
<b>HiI have built a user login using owen's advanced login tutorial . It worked fine for a couple of weeks but now it does not seem to work. %@$#@
I must of changed some thing some how. I have nailed it down to this.......
I loggon, the form sends me to the loggin.asp script. The script is processed and sends me on to the members area of my site.
Heres the problem....
When I get to the members area the first bit of code that is processed is;</b>
If Request.Cookies("ckLoggedin"

Response.Redirect "www.mydomain.com/html/guest/home/index.asp"
End if
<b>This script shoots me right back to my guest area as it cant find my cookie (I assume thats what it has to be) I took the last bit of code out in the members area to check if this was what was happening and I was not redirect and stayed in the members area.
So I figure for some reason the Loggin.asp script is not saving the "ckloggedin" cookie.
Does any one have any Ideas or trouble shooting thoughts.
Heres what my loggin.asp script looks like.
Here is my record set code:</b>
Dim login__strtxt_handle
login__strtxt_handle = "xyz"
If (Request.Form("txt_handle"


login__strtxt_handle = Request.Form("txt_handle"

End If
Dim login__strtxt_password
login__strtxt_password = "123"
If (Request.Form("txt_password"


login__strtxt_password = Request.Form("txt_password"

End If
Dim login
Dim login_numRows
Set login = Server.CreateObject("ADODB.Recordset"

login.ActiveConnection = MM_database_STRING
login.Source = "SELECT handle, Password, MemberID FROM MembersDetails WHERE handle = '" + Replace(login__strtxt_handle, "'", "''"


login.CursorType = 0
login.CursorLocation = 2
login.LockType = 1
login.Open()
login_numRows = 0
<b>then under this I have the code that makes this all work ( cheers owen )
</b>
If login__strhandle <> "xyz" AND NOT login.EOF then
Session("svMemberID"


Response.Cookies("ckLoggedin"

Response.Redirect "www.mydomain/html/member/home/index.asp"
else
Response.Redirect "www.mydomain/html/guest/home/login_error.asp"
End if
<b>Any help would be sooooo great!
Thanks for your time.</b>
Replies
Replied 30 Jan 2003 02:34:46
30 Jan 2003 02:34:46 Sven Hentschel replied:
I figured it out....... Well really I dident but I found an old back up so I just reloaded it. Guess what the problem was, charctor spacing !
!@#$%^&*( though at least I dident wast any ones time.
<img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
!@#$%^&*( though at least I dident wast any ones time.
<img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>