Want2Learn,
Quote:
quote:If Not objRS.BOF Then
Response.Redirect "tilmeld.asp?error=Navnet er desværre optaget/Tilmeldt, og du må vælge et andet !"
If objRS("PersonIP")=Request.ServerVariables("REMOTE_ ADDR") Then
Response.Redirect "tilmeld.asp?error=Der er allerede tilmeldt et navn fra denne IP, brug en anden PC for at tilmeld et andet !"
End If
Else
|
In the above code, If you redirect once you find the personName there, then there is no meaning in redirecting him again to another page, after checking the IP. that will not work, as you already redirect him to a page, once his name is matched. So you can remove off that from IF...ELSE, I mean the code snippet blocked below.
If objRS("PersonIP")=Request.ServerVariables("REMOTE_ ADDR") Then
Response.Redirect "tilmeld.asp?error=Der er allerede tilmeldt et navn fra denne IP, brug en anden PC for at tilmeld et andet !"
End If
Just to confirm, If the Name is found there in the DB, that mean he is already connected, and whatever the fromIP it should not let him connect again. That should be fine with the code given.
Revert for any clarifications.
Cheers!
_________________________
-Vijay G

Strive for Perfection
