I have a page that checks for a cookie and if one is not found, it goes to the login page. How can I have it that once they login, they go back to the page they just left? I just can't seem to figure it out.<BR>Thanks!
Request.ServerVariables("HTTP_REFERER") will give you the previous page the user was at<BR><BR>BUT<BR><BR>for a login i assume you will have to go to more than one page so you will have to pass this value through a hidden text box or a session variable to the page you will be redirecting from<BR><BR>
So, would I need a separate login page for those who log in "after the fact"? I mean, I have my main login which when someone logs in, they goto the 'logingood' page. But for someone who logs in later, I do not want them to goto the 'logingood' page, so would I need them to goto a separate login page? <BR>And if so, how would I code the HTTP_REFERER part?<BR><BR>Thanks
The "part" you wnat to use wil have the page neme the user was at when he came to your login page....ie when you MADE him come to your login page<BR><BR>Save this is a session variable<BR><BR>session("FromPage") = ....<BR><BR>then<BR><BR>after he logs in or registers whatever<BR><BR>response.redirect session("FromPage") <BR><BR>this will take the user BACK to the page he came from to login or register<BR><BR><BR>make any sence to you <BR><BR>if you cant figgure it DO NOT post again until you TRY IT..<BR><BR>then show me what you have and i can help you from there