How do I?

Results 1 to 3 of 3

Thread: How do I?

  1. #1
    Join Date
    Dec 1969

    Default How do I?

    Hi Guys,<BR><BR>I am trying to validate if a user is logged in. I have 2 groups of users, Members and Guests. Each user is required to be logged in to proceed further within a particular website. I have the following code below:<BR><BR>If Session("MemberID")= "" Then<BR>Response.Redirect "error.html?UserID=" & Request.QueryString("UserID")<BR>End If<BR><BR>How do I state that if either MemberID = "" or GuestID = "" then to redirect them because if I use the following code:<BR><BR>If Session("MemberID")= "" Or Session("GuestID") = "" Then<BR>Response.Redirect "error.html?UserID=" & Request.QueryString("UserID")<BR>End If<BR><BR>It still redirects me to error since the guest&#039;s session is not logged in. How can I say should either one be empty only then to redirect. If one of them is not empty then to allow it through. Hope I was clear in what I&#039;m trying to do.<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default If you had phrased...

    ...the English correctly, you wouldn&#039;t have messed up the VB code.<BR><BR>You said: "How do I state that if either MemberID = "" or GuestID = "" then to redirect them".<BR><BR>You should have said "How do I state that if both MemberID is blank and GuestID is blank then I wish to redirect the user".<BR><BR>AND, Trippy. AND.<BR><BR>Not OR.<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: If you had phrased...

    And, Trippy, And.<BR><BR>LOL.<BR><BR>I got your back, Trip. Don&#039;t let Bill give you any lip.<BR><BR>Hey that rhymed, right on time!

Posting Permissions

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