|
-
Jun 18th, 2001, 05:14 PM
#1
Thread Starter
Fanatic Member
First Load
Ok,
When my ASp page loads I want it to grab the IP address of the user and then comapre that to a table in the DB. A query will be ran and I will at that point know the office number of the person's PC. According to that office number I then want to run a query that will show a phone list for them. I have the queries that pull the information that I want but the hard part is telling the ASP page to run this query when it loads and then these queries when they select options out fo the drop down box...Help...
-
Jun 18th, 2001, 06:28 PM
#2
Thread Starter
Fanatic Member
-
Jun 19th, 2001, 12:07 AM
#3
Addicted Member
I'm not exactly sure what part of the problem you're having trouble with...can you not structure and submit the query, or do you not know how to get the IP address?
Things I've Said:
"Life's funny like that...elephants can wear frilly lace panties, and Dubya still looks like a monkey in a big chair"
"Take four goats and strap one to each foot of a llama. Presto, goat-powered llama!"
"You want to get me to work more, get me a Coke. No? Then deal with inferior garbage, I'm not coding another line and your clients can go to......thanks, I'd love a Coke right about now!"
-
Jun 20th, 2001, 05:30 AM
#4
Hyperactive Member
Right at the start you could do something like
<%
sIP=Request.ServerVariables("REMOTE_ADDR")
'Open the database connection
sSQL="SELECT * FROM tblName WHERE IP='" & sIP & "'"
'I used dBase as my connection
Set RS=dBase.execute(sSQL)
'do what ever from here
%>
<HTML>
<HEAD>
</HEAD>
<BODY>
<%=sIP%>
</BODY>
</HTML>
Hope this helps
Thanks in advance for any help provided.
VB 6 Enterprise Edition SP4
ADO, SQL 7/2000, ASP and some JavaScript

>> Life goes on, but for how long? <<
If you can smile when things go wrong, you have someone in mind to blame
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|