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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Oct 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Need help capturing IP address

    So I have done a bit of looking and every code that I try in my form never returns an IP address regardless of how many times I have tested it. I have included some code. The "business type" code works fine but I am struggling with the IP address part. Here is what i have in my form:

    Code:
     <td class="bodyText">Business (eg. corrugated) </td>
                    <td><input name="business" type="text" id="business" size="30">
                      <input type="hidden" name="hiddenField" id="IP Address" value="Request.ServerVariables("REMOTE_ADDR")
                      %>
                  </tr>

    Thoughts or corrections welcome.

  • #2
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    you appear to be trying to use classic asp/vbscript. if so try this:



    Code:
     <td class="bodyText">Business (eg. corrugated) </td>
                    <td><input name="business" type="text" id="business" size="30">
                      <input type="hidden" name="hiddenField" id="IP Address" value="<%=Request.ServerVariables("REMOTE_ADDR") %>">
                  </tr>
    Last edited by DanInMa; 10-25-2011 at 08:16 PM.

  • Users who have thanked DanInMa for this post:

    Microsuck (10-25-2011)

  • #3
    New to the CF scene
    Join Date
    Oct 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    DanInMa,

    I gave it a try and here are a couple issues I had.

    1) For some reason the text "> is appearing on the screen where i placed the hidden field....here is a link to the page in progress....look next to the business text box and you can see the floating text: http://www.capesystems.com/pallet-pa...formation2.htm

    2)When I submit the page, the Hidden field information that should say the IP address says this : hiddenField: <%=Request.ServerVariables(

    I hate web coding


  •  

    Posting Permissions

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