百度金矿贴吧:请指点GetFormVariable()是什么意思?怎么用啊?

来源:百度文库 编辑:中科新闻网 时间:2024/04/28 15:49:05
<%
if GetVariable("action")="save" then
'下订餐单
if Session("ProductList")="" then
Response.Write "<script language='javascript'>alert('欢迎您来到旅游资讯网,您尚未点订购任何商品!\n\n请您先到产品展示区选择您想要的商品');</script>"
end if

strUser=GetFormVariable("txtuser")
strAddr=GetFormVariable("txtaddress")
strPhote=GetFormVariable("txtphote")
strEmail=GetFormVariable("txtemail")
strNote=GetFormVariable("txtnote")

strProduct=""
'输出商品列表
ProductList = Session("ProductList") '商品ID列表
ProductCount=Session("ProductCount") '商品数量列表
PtCounts = Split(ProductCount, ",")
strSQL="Select * From web_product Where id In (" & ProductList & "0)"
Set rs=Server.CreateObject("ADODB.RecordSet")
Rs.open strSQL,conn,1,1
money=0
strProduct=strProduct & "<table width=100% border=0 cellspacing=1 cellpadding=0>"
strProduct=strProduct & " <tr> "
strProduct=strProduct & " <td width=11% align=center>序号</td>"
strProduct=strProduct & " <td width=32% align=center>旅游线路名称</td>"
strProduct=strProduct & " <td width=21% align=right>单价</td>"
strProduct=strProduct & " <td width=18% align=right>数量</td>"
strProduct=strProduct & " <td width=18% align=right>小计</td>"
strProduct=strProduct & " </tr>"
For i=1 to rs.recordcount
if rs.eof then exit for
dblPrice=Rs("p_price")
if Session("m_UserID")<>"" then
dblPrice=Rs("p_price1")
End if

xj=dblPrice * Cint(PtCounts(i-1))
money=money+xj
strProduct=strProduct & " <tr> "
strProduct=strProduct & " <td align=center>" & i & "</td>"
strProduct=strProduct & " <td align=center>" & trim(Rs("p_name")) & "</td>"
strProduct=strProduct & " <td align=right>¥" & trim(dblPrice) & "</td>"
strProduct=strProduct & " <td align=right>" & PtCounts(i-1) & "</td>"
strProduct=strProduct & " <td align=right>¥" & xj & "</td>"
strProduct=strProduct & " </tr>"
rs.movenext
next
strProduct=strProduct & "<tr> <td colspan=5><strong>总计:¥" & money & "</strong></td> </tr></table>"

strSQL="Insert Into web_product_order(m_id,mn_id,o_addr,o_phote,o_user,o_email,o_note,o_product,o_productList,o_productCount) Values("
strSQL=strSQL & "0" & trim(Session("UserID")) & ","
strSQL=strSQL & "0" & GetVariable("mnid") & ","
strSQL=strSQL & "'" & strAddr & "',"
strSQL=strSQL & "'" & strPhote & "',"
strSQL=strSQL & "'" & strUser & "',"
strSQL=strSQL & "'" & strEmail & "',"
strSQL=strSQL & "'" & strNote & "',"
strSQL=strSQL & "'" & strProduct & "',"
strSQL=strSQL & "'" & ProductList & "',"
strSQL=strSQL & "" & cint(ProductCount) & ")"
conn.execute strSQL,0,1
Response.Write "<script language='javascript'>alert('旅游资讯网已经接收您的订单,谢谢您惠顾!');</script>"
end if
%>

<%

估计...是把textbox 中的资料,堤出来
传给一个变数之中