I'm used to unix/cgi scripts so im slightly out of my depth here.
Ive got an asp script for a website form which works fine.
What i want to do is also get the form to include the ip address of the
perosn sending the form ie
<input type=hidden name=env_report value=REMOTE_AD DR>
Anyone know how to apply this to this asp script below?:
<%
For Each x in request.form
sBody = sBody & x & " = " & request.form(x) & vbCrLf
Next
Set MailObject = Server.CreateOb ject("CDONTS.Ne wMail")
MailObject.From = "we*****@xxx.co m"
MailObject.To = "we*****@xxx.co m"
MailObject.Subj ect = "Form"
MailObject.Body = sBody & vbCrLf
MailObject.Send
Set MailObject = Nothing
' Now redirect
Response.Redire ct "http://www.xxx/thank_you.htm"
%> 44 3257
you mean you want to get the literal "REMOTE_ADD R" as the from?
Request.Form("i nputNameHere")
will get you what you want, it retrieves the value
--
Curt Christianson
Owner/Lead Developer, DF-Software www.Darkfalz.com
"Mike" <me@privacy.net > wrote in message
news:10******** ********@despin a.uk.clara.net. .. I'm used to unix/cgi scripts so im slightly out of my depth here. Ive got an asp script for a website form which works fine. What i want to do is also get the form to include the ip address of the perosn sending the form ie <input type=hidden name=env_report value=REMOTE_AD DR> Anyone know how to apply this to this asp script below?: <% For Each x in request.form sBody = sBody & x & " = " & request.form(x) & vbCrLf Next Set MailObject = Server.CreateOb ject("CDONTS.Ne wMail") MailObject.From = "we*****@xxx.co m" MailObject.To = "we*****@xxx.co m" MailObject.Subj ect = "Form" MailObject.Body = sBody & vbCrLf
MailObject.Send Set MailObject = Nothing ' Now redirect Response.Redire ct "http://www.xxx/thank_you.htm" %>
"Mike" <me@privacy.net > wrote in message
news:10******** ********@despin a.uk.clara.net. .. I'm used to unix/cgi scripts so im slightly out of my depth here. Ive got an asp script for a website form which works fine. What i want to do is also get the form to include the ip address of the perosn sending the form ie <input type=hidden name=env_report value=REMOTE_AD DR>
On the ASP page that includes the form, add this (within the form tags):
<%
Response.Write( "<input type=""hidden"" name=""env_repo rt"" value=""" &
Request.ServerV ariables("REMOT E_ADDR") & """>" )
%>
Anyone know how to apply this to this asp script below?:
You would not need to modify the script below... it iterates through all of
the items in the form.
Hope this helps.
Regards,
Peter Foti
<% For Each x in request.form sBody = sBody & x & " = " & request.form(x) & vbCrLf Next Set MailObject = Server.CreateOb ject("CDONTS.Ne wMail") MailObject.From = "we*****@xxx.co m" MailObject.To = "we*****@xxx.co m" MailObject.Subj ect = "Form" MailObject.Body = sBody & vbCrLf
MailObject.Send Set MailObject = Nothing ' Now redirect Response.Redire ct "http://www.xxx/thank_you.htm" %>
"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:ON******** ******@TK2MSFTN GP09.phx.gbl... you mean you want to get the literal "REMOTE_ADD R" as the from?
Request.Form("i nputNameHere") will get you what you want, it retrieves the value
-- Curt Christianson Owner/Lead Developer, DF-Software www.Darkfalz.com
tried that but without success. i'm not quite sure where to insert this.
Can you edit my code below so i can see exactly what/where you mean
<% For Each x in request.form sBody = sBody & x & " = " & request.form(x) & vbCrLf Next Set MailObject = Server.CreateOb ject("CDONTS.Ne wMail") MailObject.From = "we*****@xxx.co m" MailObject.To = "we*****@xxx.co m" MailObject.Subj ect = "Form" MailObject.Body = sBody & vbCrLf
MailObject.Send Set MailObject = Nothing ' Now redirect Response.Redire ct "http://www.xxx/thank_you.htm" %>
Also, keep in mind that the reported IP may or may not be the actual
IP, since proxies and NAT can report a different IP.
Jeff
On Wed, 28 Jan 2004 12:41:52 -0500, "Peter Foti"
<pe***@Idontwan tnostinkingemai lfromyou.com> wrote: "Mike" <me@privacy.net > wrote in message news:10******* *********@despi na.uk.clara.net ... I'm used to unix/cgi scripts so im slightly out of my depth here. Ive got an asp script for a website form which works fine. What i want to do is also get the form to include the ip address of the perosn sending the form ie <input type=hidden name=env_report value=REMOTE_AD DR>
On the ASP page that includes the form, add this (within the form tags):
<% Response.Write ("<input type=""hidden"" name=""env_repo rt"" value=""" & Request.Server Variables("REMO TE_ADDR") & """>" ) %>
Anyone know how to apply this to this asp script below?:
You would not need to modify the script below... it iterates through all of the items in the form. Hope this helps. Regards, Peter Foti
<% For Each x in request.form sBody = sBody & x & " = " & request.form(x) & vbCrLf Next Set MailObject = Server.CreateOb ject("CDONTS.Ne wMail") MailObject.From = "we*****@xxx.co m" MailObject.To = "we*****@xxx.co m" MailObject.Subj ect = "Form" MailObject.Body = sBody & vbCrLf
MailObject.Send Set MailObject = Nothing ' Now redirect Response.Redire ct "http://www.xxx/thank_you.htm" %>
Try:
<%
For Each x in request.form
sBody = sBody & x & " = " & request.form(x) & vbCrLf
Next
sBody = sBody & "IP Address: " & Request.ServerV ariables("REMOT E_ADDR")
''rest of your code
Also, instead of CDONTS, you should be using CDO, unless you're on an NT 4
server. CDONTS is being phased out. http://www.aspfaq.com/show.asp?id=2026
Ray at home
"Mike" <me@privacy.net > wrote in message
news:10******** ********@despin a.uk.clara.net. .. I'm used to unix/cgi scripts so im slightly out of my depth here. Ive got an asp script for a website form which works fine. What i want to do is also get the form to include the ip address of the perosn sending the form ie <input type=hidden name=env_report value=REMOTE_AD DR> Anyone know how to apply this to this asp script below?: <% For Each x in request.form sBody = sBody & x & " = " & request.form(x) & vbCrLf Next Set MailObject = Server.CreateOb ject("CDONTS.Ne wMail") MailObject.From = "we*****@xxx.co m" MailObject.To = "we*****@xxx.co m" MailObject.Subj ect = "Form" MailObject.Body = sBody & vbCrLf
MailObject.Send Set MailObject = Nothing ' Now redirect Response.Redire ct "http://www.xxx/thank_you.htm" %>
Not to mention that by grabbing the value from a form element, it can be
whatever value someone wants it to be then, like if someone created his own
form and posted it. I don't know anyone would want to do that in this
particular example though.
Ray at home
"Jeff Cochran" <jc************ *@naplesgov.com > wrote in message
news:40******** *********@msnew s.microsoft.com ... Also, keep in mind that the reported IP may or may not be the actual IP, since proxies and NAT can report a different IP.
Jeff
On Wed, 28 Jan 2004 12:41:52 -0500, "Peter Foti" <pe***@Idontwan tnostinkingemai lfromyou.com> wrote:
"Mike" <me@privacy.net > wrote in message news:10******* *********@despi na.uk.clara.net ... I'm used to unix/cgi scripts so im slightly out of my depth here. Ive got an asp script for a website form which works fine. What i want to do is also get the form to include the ip address of the perosn sending the form ie <input type=hidden name=env_report value=REMOTE_AD DR>
On the ASP page that includes the form, add this (within the form tags):
<% Response.Write ("<input type=""hidden"" name=""env_repo rt"" value=""" & Request.Server Variables("REMO TE_ADDR") & """>" ) %>
Anyone know how to apply this to this asp script below?:
You would not need to modify the script below... it iterates through all
ofthe items in the form. Hope this helps. Regards, Peter Foti
<% For Each x in request.form sBody = sBody & x & " = " & request.form(x) & vbCrLf Next Set MailObject = Server.CreateOb ject("CDONTS.Ne wMail") MailObject.From = "we*****@xxx.co m" MailObject.To = "we*****@xxx.co m" MailObject.Subj ect = "Form" MailObject.Body = sBody & vbCrLf
MailObject.Send Set MailObject = Nothing ' Now redirect Response.Redire ct "http://www.xxx/thank_you.htm" %>
"Ray at <%=sLocation% >" <myFirstNameATl ane34dotKOMM> wrote in message
news:uv******** ******@TK2MSFTN GP11.phx.gbl... Try:
<% For Each x in request.form sBody = sBody & x & " = " & request.form(x) & vbCrLf Next
sBody = sBody & "IP Address: " & Request.ServerV ariables("REMOT E_ADDR") ''rest of your code
Also, instead of CDONTS, you should be using CDO, unless you're on an NT 4 server. CDONTS is being phased out. http://www.aspfaq.com/show.asp?id=2026
Ray at home
Thanks ray that works a treat, just the help i was after. Thanks for that
:)
> Also, instead of CDONTS, you should be using CDO, unless you're on an NT 4 server. CDONTS is being phased out. http://www.aspfaq.com/show.asp?id=2026
Ray at home
Is this likely to be phased out soon?
FYI: The host is www.hostmysite.com
As i said i know nothing about asp / CDONTS / CDO.
currently i am using the above script with a form action of:
<form name="form" method="post" action="http://www.xxx.com/form.asp">
Is there a simple way to alter the current script to CDO or am i going to
have to look for somehting new?
Your advice is appreciated
Win2000 is the last server OS to carry CDONTS natively, and already has CDO
as well.
Win2003 is CDO
--
Curt Christianson
Owner/Lead Developer, DF-Software www.Darkfalz.com
"Mike" <me@privacy.net > wrote in message
news:10******** ********@eunomi a.uk.clara.net. .. Also, instead of CDONTS, you should be using CDO, unless you're on an NT
4 server. CDONTS is being phased out. http://www.aspfaq.com/show.asp?id=2026
Ray at home
Is this likely to be phased out soon? FYI: The host is www.hostmysite.com
As i said i know nothing about asp / CDONTS / CDO.
currently i am using the above script with a form action of:
<form name="form" method="post" action="http://www.xxx.com/form.asp">
Is there a simple way to alter the current script to CDO or am i going to have to look for somehting new?
Your advice is appreciated This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: laurie |
last post by:
Hi all,
I'm trying to help out a friend who has inherited a client with a PHP
shopping cart application. Neither of us know PHP, but I've been
muddling my way through, trying to get these old scripts working on a
new server with the most recent version of PHP. I've pretty much
taken care of all the various errors that were popping up. Most only
pointed out out non-fatal undefined or assumed variables. I've been
able to cure most of...
|
by: Mindful_Spirit |
last post by:
I'm trying to set up a basic email feed back form
like
this, and was wondering about some basic configuration settings. I
have used code from
this
website. I have it working just fine. I'm running IIS on my home
machine.
My problem is that I need to upload this stuff to a webhosting place and
register a domain and I'm not sure what to put as the smtp mail server value
|
by: Roel |
last post by:
Hello,
I have a simple script that will reload http://website/CAM1picture.jpg every
xx minutes. I'm trying to add a form <input type="submit" value="CAM1"
name="B1"><input type="submit" value="CAM2" name="B1"> So when I click on
CAM2 button it will reload http://website/CAM2picture.jpg and when I click
on CAM3 button it will reload http://website/CAM3picture.jpg and so on.
I appreciate if someone can show me how to do it. Here's a...
|
by: freemann |
last post by:
Can anyone provide example code showing how to send form results to a results
page, email and a comma delimited file? Notice that I need it going to all
three locations.
Details: I have forms created and working. The first form the user fills out
and submits. The form properties are set to Send to other: "Custom ISAPI,
NSAPI, CGI, OR ASP SCRIPTING. The method is "POST" and the action is
"secondpage.asp". I had to go this route because...
|
by: casper christensen |
last post by:
Hi
I run a directory, where programs are listed based on the number of
clicks they have recieved. The program with most clicks are placed on
top and so on. Now I would like people to be apple to place a link on
there site so people can vote for their program, "ad a click". eg
someone clicks the link on some page and it counts +1 click on my page.
if some one clicks the link below it will count a click on my page.
| |
by: liamo |
last post by:
Don't laugh lol I know your all php guru's : )
Ok, so I have little if any knowledge with the programming language php
- only having created small enquiry forms. Now I have a client that
needs a job order form with a little more function than having solely
contact details and a big enquiry text area.
The form I created in HTML is located at
http://www.ebesign.co.nz/projects/justfixit/job_order_form.html
and has used javascript to...
|
by: Porkie999 |
last post by:
-----------------------------------------------------------------------QUESTION
hi i am really stuck with this and its only a small problem.
i want to be able to type .........
dsfsjfjsjjfs in User Box
fjdjskfjds in password box
www.thescripts.com in website box
then i want to have a button which says "save" which then saves the 3 above pieces of text into a notepad file.
So like I said I want to be able to type a login, password and...
|
by: Comcast |
last post by:
I am using a form that uses PHP to create an e-mail and send it off. When
the script runs, I get an error page, although the e-mail is sent off. The
error I am getting is:
Warning: session_start(): Cannot send session cache limiter - headers
already sent (output started at
/home/content/website/html/contact/scformproc.php:1) in
/home/content/website/html/contact/scformproc.php on line 51
?
Warning: Cannot modify header information -...
|
by: Twisted01 |
last post by:
Hello, I am new here and I hope I have the correct forum to answer my question.
I am creating a website for a friend and they need a "Search Form" so that visitors can search for items on the website rather than searching the entire website to find what they are looking for.
I know about my HTML/XHTML and CSS coding and the basic coding for a Search Form. What I need is help with any other files needed to make my Form a workable Search Form so...
|
by: mideastgirl |
last post by:
I have recently been working on a website for an honors association, and have a lot of difficulty but have found help from those on this site. I would like to see if I can get some more help on a different issue than what I was initially having.
I am working on storing data collected from a form on my website. I would like the information to be stored into MySQL once entered by users. I have googled this question and have tried multiple...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |