回 帖 发 新 帖 刷新版面

主题:如何从上页将一个值传道下页


[img]http://61.236.237.153/ly/www/snap2.gif[/img]

如图。那位老大能指出该如何写。谢谢!
源码如下:
<%
If request.cookies("PPst_UserName")="" or Session("PPst_UserName")="" then 
    response.Redirect "PPst_Error.asp?ErrorInfo=<li>你必须登陆后才能进入用户中心  <a href=PPst_Login.asp>== 点这里登陆 ==</a>"
    response.End() 
End if
%>
<!--#include file="PPst_Conn.asp" -->
<!--#include file="PPst_Inc.asp" -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>短信-<%=WebName%> Power By PaPasite</title>
<LINK href="PPst_Inc/<%=PPst_Skin%>.css" type=text/css rel=stylesheet>
</head>

<body>
<%    Dim UserName
    UserName=Request("UserName")
    

    Set rs=Server.CreateObject("ADODB.RecordSet")
    rs.Open "select * from [PPst_User] where ID = "&UserID,conn,1,1
    Dim UserName
    If rs.bof or rs.eof then
        response.Redirect "PPst_Error.asp?ErrorInfo=<li>用户名不存在,ID号错误..."
        response.End()
    Elseif rs("Level")=10 and (request.Cookies("PPst_Level")<>10 and Session("PPst_Level")<>10) then 
        response.Redirect "PPst_Error.asp?ErrorInfo=<li>不允许查看管理员的信息.."
        response.End()
    End if

    UserName=rs("UserName")
    rs.Close

%>    


<%    Dim IsUserName
    Set rs=Server.CreateObject("adodb.recordSet")
    rs.open "select * from [PPst_UserConfig] where ID=1",conn,1,1
    IsUserName=rs("UserName")
    
    rs.Close
    Conn.Close
%>


<%
Action=request("Action")
 If Action="Send" then 
     Set rs=Server.CreateObject("adodb.recordSet")
    If IsNumeric(Request("Geter")) then
        rs.open "Select * from [PPst_User] where PaPa="&Request("Geter"),conn,1,1 
    Else
        rs.open "Select * from [PPst_User] where UserName='"&Request("Geter")&"'",conn,1,1
    End If
    Geter_ID=rs("id")
    rs.close
    Set rs=Server.CreateObject("adodb.recordSet")
    rs.open "Select * from [PPst_User] where UserName='"&Request("UserName")&"'",conn,1,1
    Sender_ID=rs("id")
    rs.Close
    Set rs=Server.CreateObject("adodb.recordSet")
    rs.open "Select * from [PPst_Msg]",conn,1,3
    rs.AddNew
    rs("Geter")=fID
    rs("Sender")=Sender_ID
    rs("Title")=request("Title")
    rs("Content")=request("Content")
    rs("SendTime")=Now()
    rs.update
    rs.close
    Call ShowInfo("成功发送",1)
End If
 %>
<table width="550" height="30" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="550" border="0" align="center" cellpadding="0" cellspacing="0" class="lantable">
  <tr>
    <td height="25" colspan="5" align="center" valign="middle" background="PPst_Images/skin/<%=PPst_Skin%>/back.gif"><span class="cuti_baise">用户短信管理</span></td>
  </tr>
  <tr>
    <td height="20" colspan="5" align="center" bgcolor="#EBFAEE" class="xiabianlan"><br />
    <%If Action="" then%>
      <table width="500" border="1" cellspacing="0" cellpadding="0">
      <form action="PPst_Sms.asp?Action=Send" method="post" name="form1" id="form1">
      <tr>
        <td align="center">收件人</td><%End if%>
  <%If IsUserName<>0 then%>
        <td><input name="Geter" type="text" id="Geter" size="20" maxlength="50" /><%=UserName%>
          用户名或PaPa号&nbsp; 
            <input type="submit" name="Submit2" value="立即发送" /></td>
      </tr>
      <tr>
        <td width="82" align="center">标题</td>
        <td width="418"><input name="Title" type="text" id="Title" size="50" maxlength="50" /></td>
      </tr>
      <tr>
        <td align="center">内容</td>
        <td><textarea name="Content" cols="50" rows="10" id="Content"></textarea></td>
      </tr>
        </form>
    </table>
<%ElseIf Action="View" then
    Set rs=Server.CreateObject("adodb.recordSet")
    rs.open "Select * from [PPst_Msg] where ID="&request("ID"),conn,1,1 
    
    %>
          <table width="500" border="1" cellspacing="0" cellpadding="0">
      <form action="PPst_Sms.asp?Action=Send" method="post" name="form1" id="form1">
      <tr>
        <td width="82" align="center">&nbsp;</td>
        <td width="418">&nbsp;</td>
      </tr>
        </form>
    </table>
    <br /></td>
  </tr>
  
  <tr>
    <td colspan="5" align="center" class="xiabianlan"><br />
      <br /></td></tr>
<%    end if
    rs.close
    set rs=nothing
conn.close
set conn=nothing%>
    <tr>
      <td colspan="5" align="center" bgcolor="#EBFAEE" class="xiabianlan">&nbsp;</td>
    </tr>
</table>
</body>
</html>

回复列表 (共3个回复)

沙发

<%
 ID=request("id") '得到上一页传来的值
%>



<a href="aaa.asp?bbb=<%=id%>">下一页</a>

这样不行吗?

板凳

<td><input name="Geter" type="text" id="Geter" size="20" maxlength="50" value="<%=username%>" />

3 楼

两个办法都有效。谢谢!

我来回复

您尚未登录,请登录后再回复。点此登录或注册