Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Jul 2003
    Location
    england
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question IP address in a form

    Hi all how can you display an IP address in a form which is mailable,
    thanks for your help,
    wappo

  • #2
    Mega-ultimate member
    Join Date
    Jun 2002
    Location
    Winona, MN - The land of 10,000 lakes
    Posts
    1,855
    Thanks
    1
    Thanked 45 Times in 42 Posts
    This should do it...

    PHP Code:
    <input type="hidden" name="ipaddress" value="<?php echo $_SERVER['REMOTE_ADDR'];?>" />

  • #3
    New Coder
    Join Date
    Jul 2003
    Location
    england
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    echo

    <input type="hidden" name="ipaddress" value="<?php echo $_SERVER['REMOTE_ADDR'];?>" />

    How do you put that inside an echo tag, i keep getting errors lol!

  • #4
    Mega-ultimate member
    Join Date
    Jun 2002
    Location
    Winona, MN - The land of 10,000 lakes
    Posts
    1,855
    Thanks
    1
    Thanked 45 Times in 42 Posts
    Um, you don't need to.

    But, if want want to, the following would work...

    PHP Code:
    echo "<input type='hidden' name='ipaddress' value='".$_SERVER['REMOTE_ADDR']."' />"

  • #5
    New Coder
    Join Date
    Jul 2003
    Location
    england
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Wow,
    thankyou so much for your time


  •  

    Posting Permissions

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