Results 1 to 3 of 3

Thread: Making form results reflect unique IP

  1. #1
    Join Date
    May 2007
    Posts
    97
    Thanks
    14
    Thanked 0 Times in 0 Posts

    Default Making form results reflect unique IP

    I took a smart member's advice and started a new thread for the second half of my question. No need to read through the first (longer) half of what I had asked previously. The code below is one line of my form, which records the IP of those who fill it out. However, it's recording the same IP for everyone, which is the one in the code. What do I have to add so the person's own IP records in the form results instead of that one?

    Code:
    <input name="custom ipaddress" id="ip" value="96.250.22.67" type="hidden">

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    if you have php on your server, you only have to add <?php echo $_SERVER['REMOTE_ADDR']; ?> to the form field in the place of the actual ip address (and of course you have to rename the file from .html to .php).

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. The Following User Says Thank You to thetestingsite For This Useful Post:

    nycguurl (11-11-2008)

  4. #3
    Join Date
    May 2007
    Posts
    97
    Thanks
    14
    Thanked 0 Times in 0 Posts

    Default

    Thank you I will try that out!

Bookmarks

Posting Permissions

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