...

View Full Version : Need help capturing IP address



kevinkanif
10-25-2011, 07:21 PM
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:


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

DanInMa
10-25-2011, 08:14 PM
you appear to be trying to use classic asp/vbscript. if so try this:




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

kevinkanif
10-25-2011, 11:58 PM
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-pattern-information2.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 :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum