Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 27th, 2004, 04:49 AM
Authorized User
 
Join Date: May 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

SNIB

Thanks because U was trying to help me !! :D

 
Old May 27th, 2004, 01:37 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

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





Similar Threads
Thread Thread Starter Forum Replies Last Post
Webpage with DB conection make SQL OVERFLOW rtr1900 Classic ASP Databases 3 March 28th, 2008 07:30 AM
Make 2 or 1 Muhammad Zeeshan SQL Server 2000 2 August 16th, 2007 01:10 PM
Can someone make this? JonathanRay C# 4 February 16th, 2007 08:57 AM
How can I make that? kalchev ASP.NET 2.0 Professional 0 April 3rd, 2006 07:01 AM
How to make hierarchical data "lay flat" using SQL tinlong SQL Language 1 August 1st, 2003 01:38 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.