Results 1 to 4 of 4

Thread: First Load

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Seattle
    Posts
    954

    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...

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Seattle
    Posts
    954
    Anyone...

  3. #3
    Addicted Member csammis's Avatar
    Join Date
    Mar 2001
    Location
    /dev/null
    Posts
    226
    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!"

  4. #4
    Hyperactive Member parkes's Avatar
    Join Date
    Jan 1999
    Location
    Unitied Kingdom
    Posts
    303
    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
  •  



Click Here to Expand Forum to Full Width