HTTP Referrer Question

Results 1 to 2 of 2

Thread: HTTP Referrer Question

  1. #1
    Join Date
    Dec 1969

    Default HTTP Referrer Question

    I was wondering someone could suggest a strategy. I have script that sends out emails to peope each sunday. In the script, it lists their appointments for the upcoming week. THese appointments are hyperlinked to the actually appointment as such:<BR><BR><BR><BR>However, if the user is not logged into the web site, they go to a login page. My question is this...How do I make it so that after they login, they go to the original link they clicked on? I tried using the HTTP Referrer, but if the user is using web-based email (like Yahoo or Hotmail), the HTTP Referrer is the URL of the email message. Any ideas?

  2. #2
    Join Date
    Dec 1969

    Default How is the user sent... the login page?<BR><BR>Do they get to the Appointments.asp page first, you discover they aren&#039;t logged in, and then you send them to the login page?<BR><BR>If so, why not simply capture the querystring in the Appointments.asp page and, if you have to send them to the login page, put the querystring (or the pertinent parts of it, if you prefer) into a Session variable. After the user&#039;s login is verified, you check to see if that particular session variable is set and, if so, send them off to it!<BR><BR>So:<BR><BR>******** Appointments.asp *********<BR><BR>&#060;%<BR>If Session("LoggedIn") &#060;&#062; "Okay" Then<BR>&nbsp; &nbsp; Session("redirect") = "Appointments.asp?" & Request.QueryString<BR>&nbsp; &nbsp; Response.Redirect "login.asp"<BR>End If<BR>%&#062;<BR>...<BR><BR>******* Login.asp **********<BR><BR>&#060;FORM ... Action="confirmLogin.asp" ...&#062;<BR><BR>******* ConfirmLogin.asp **********<BR><BR>&#060;%<BR>If ... username and password are valid ... Then<BR>&nbsp; &nbsp; Session("LoggedIn") = "Okay" &#039; let other pages know<BR><BR>&nbsp; &nbsp; If Session("redirect") &#060;&#062; "" Then<BR>&nbsp; &nbsp; &nbsp; &nbsp; Response.Redirect Session("redirect")<BR>&nbsp; &nbsp; End If<BR>&nbsp; &nbsp; ... okay login without redirect ...<BR>Else<BR>&nbsp; &nbsp; ... bad login ...<BR>End If<BR>%&#062;<BR><BR>************************<BR>< BR>Will that work?<BR><BR>[By the way, what does this have to do with Databases, the nominal subject of this forum?]<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts