Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I want to record the IP address of anyone who sends my form

Status
Not open for further replies.

colners

Technical User
Mar 21, 2003
72
GB

I currently have a form which sends details to an e-mail address using CDONTS.

I want to be able to record the IP address of the form's sender and send this with the rest of the information to an e-mail.

Is this possible and how can I do this?

Regards,
 
response.write("Your IP Address is: " & request.servervariables("REMOTE_ADDR"))
 

Sorry, forgot to mention. My form is a standard HTML form which is submitted to an ASP script via the POST method.

Does this make a difference?

Regards,
 
Nope. Put the code in the ASP page and include the variable in your email.
<%
UserIP=request.servervariables(&quot;REMOTE_ADDR&quot;)
%>
 

That's great. Thank you. I've tried and tested it and it works fine.

Regards,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top