帮助asp网站表单 [英] Help with asp website form

查看:38
本文介绍了帮助asp网站表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经习惯了unix / cgi脚本,所以我稍微超出了我的深度。

我有一个网站表单的asp脚本,工作正常。

我想做的还是获取表格,包括发送表格的

perosn的IP地址,即

< input type = hidden name = env_report value = REMOTE_ADDR>

任何人都知道如何将此应用于下面的这个asp脚本?:


<%

For Each x in request.form

sBody = sBody& x& " = &安培; request.form(x)& vbCrLf

下一页

设置MailObject = Server.CreateObject(" CDONTS.NewMail")

MailObject.From =" we *** **@xxx.com"

MailObject.To =" we ***** @ xxx.com"

MailObject.Subject =" Form"

MailObject.Body = sBody& vbCrLf


MailObject.Send

设置MailObject = Nothing

''现在重定向

响应。重定向http://www.xxx/thank_you.htm"

%>

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_ADDR>
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.CreateObject("CDONTS.NewMail")
MailObject.From = "we*****@xxx.com"
MailObject.To = "we*****@xxx.com"
MailObject.Subject = "Form"
MailObject.Body = sBody & vbCrLf

MailObject.Send
Set MailObject = Nothing
'' Now redirect
Response.Redirect "http://www.xxx/thank_you.htm"
%>

推荐答案

你的意思是你想得到文字REMOTE_ADDR作为来自?


Request.Form(" inputNameHere")

会得到你想要的东西,它会检索值


-

Curt Christianson

所有者/首席开发人员,DF-Software
www.Darkfalz.com

" Mike" < me@privacy.net>在消息中写道

news:10 **************** @ despina.uk.clara.net ...
you mean you want to get the literal "REMOTE_ADDR" as the from?

Request.Form("inputNameHere")
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****************@despina.uk.clara.net...
I我曾经习惯使用unix / cgi脚本,所以我在这里稍微超出了我的深度。
我有一个网站表单的asp脚本,工作正常。
我想做的也是获取表格包括发送表单的
perosn的IP地址,即
<输入类型=隐藏名称= env_report值= REMOTE_ADDR>
任何人都知道如何将此应用于下面的这个asp脚本?:

<%
请求中的每个x.form
sBody = sBody& x& " = &安培; request.form(x)& vbCrLf
下一页
设置MailObject = Server.CreateObject(" CDONTS.NewMail")
MailObject.From =" we ***** @ xxx.com"
MailObject .To =" we ***** @ xxx.com"
MailObject.Subject =" Form"
MailObject.Body = sBody& vbCrLf

MailObject.Send
设置MailObject = Nothing
''现在重定向
Response.Redirect" http://www.xxx/thank_you.htm"
%>
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_ADDR>
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.CreateObject("CDONTS.NewMail")
MailObject.From = "we*****@xxx.com"
MailObject.To = "we*****@xxx.com"
MailObject.Subject = "Form"
MailObject.Body = sBody & vbCrLf

MailObject.Send
Set MailObject = Nothing
'' Now redirect
Response.Redirect "http://www.xxx/thank_you.htm"
%>



" Mike" < me@privacy.net>在消息中写道

news:10 **************** @ despina.uk.clara.net ...
"Mike" <me@privacy.net> wrote in message
news:10****************@despina.uk.clara.net...
I我曾经习惯使用unix / cgi脚本,所以我在这里稍微超出了我的深度。
我有一个网站表单的asp脚本,工作正常。
我想做的也是获取表格包括发送表单的
perosn的IP地址,即
< input type = hidden name = env_report value = REMOTE_ADDR>


在包含表单的ASP页面上,添加(在表单标签内):


<%

Response.Write("< input type ="" hidden"" name ="" env_report"" value ="""&

Request.ServerVariables(" REMOTE_ADDR")&""">")

%>

任何人都知道如何将此应用于此asp下面的脚本?:


你不需要修改下面的脚本......它遍历所有

表格中的项目。

希望这会有所帮助。

问候,

Peter Foti


<%
每个请求中的x。
sBody = sBody& x& " = &安培; request.form(x)& vbCrLf
下一页
设置MailObject = Server.CreateObject(" CDONTS.NewMail")
MailObject.From =" we ***** @ xxx.com"
MailObject .To =" we ***** @ xxx.com"
MailObject.Subject =" Form"
MailObject.Body = sBody& vbCrLf

MailObject.Send
设置MailObject = Nothing
''现在重定向
Response.Redirect" http://www.xxx/thank_you.htm"
%>
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_ADDR>
On the ASP page that includes the form, add this (within the form tags):

<%
Response.Write("<input type=""hidden"" name=""env_report"" value=""" &
Request.ServerVariables("REMOTE_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.CreateObject("CDONTS.NewMail")
MailObject.From = "we*****@xxx.com"
MailObject.To = "we*****@xxx.com"
MailObject.Subject = "Form"
MailObject.Body = sBody & vbCrLf

MailObject.Send
Set MailObject = Nothing
'' Now redirect
Response.Redirect "http://www.xxx/thank_you.htm"
%>





" Curt_C [MVP]" < software_AT_darkfalz.com>在消息中写道

新闻:ON ************** @ TK2MSFTNGP09.phx.gbl ...

"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:ON**************@TK2MSFTNGP09.phx.gbl...
你的意思是你想要得到文字REMOTE_ADDR作为来自?

Request.Form(inputNameHere)
会得到你想要的东西,它会检索到值

-
Curt Christianson
所有者/首席开发人员,DF-Software
www.Darkfalz.com


尝试了但没有成功。我不太确定在哪里插入这个。

你可以在下面编辑我的代码,这样我就可以确切地看到你的意思/你在哪里

<%
对于请求中的每个x.form
sBody = sBody& x& " = &安培; request.form(x)& vbCrLf
下一页
设置MailObject = Server.CreateObject(" CDONTS.NewMail")
MailObject.From =" we ***** @ xxx.com"
MailObject .To =" we ***** @ xxx.com"
MailObject.Subject =" Form"
MailObject.Body = sBody& vbCrLf

MailObject.Send
设置MailObject = Nothing
''现在重定向
Response.Redirect" http://www.xxx/thank_you.htm"
%>
you mean you want to get the literal "REMOTE_ADDR" as the from?

Request.Form("inputNameHere")
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.CreateObject("CDONTS.NewMail")
MailObject.From = "we*****@xxx.com"
MailObject.To = "we*****@xxx.com"
MailObject.Subject = "Form"
MailObject.Body = sBody & vbCrLf

MailObject.Send
Set MailObject = Nothing
'' Now redirect
Response.Redirect "http://www.xxx/thank_you.htm"
%>



这篇关于帮助asp网站表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆