| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1885 人关注过本帖
标题:登陆进去了,但表单提交没反映,那位大虾指教一下啊,这是下来修改的。
取消只看楼主 加入收藏
fux88
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2014-11-4
结帖率:0
收藏
已结贴  问题点数:20 回复次数:2 
登陆进去了,但表单提交没反映,那位大虾指教一下啊,这是下来修改的。
<!--#include file="conn.asp" -->
<html>
<head>
<title>登陆成功</title>
<%
' *** Edit Operations: declare variables

Dim MM_editAction
Dim MM_abortEdit
Dim MM_editQuery
Dim MM_editCmd

Dim MM_editConnection
Dim MM_editTable
Dim MM_editRedirectUrl
Dim MM_editColumn
Dim MM_recordId

Dim MM_fieldsStr
Dim MM_columnsStr
Dim MM_fields
Dim MM_columns
Dim MM_typeArray
Dim MM_formVal
Dim MM_delim
Dim MM_altVal
Dim MM_emptyVal
Dim MM_i

MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
  MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
End If

' boolean to abort record edit
MM_abortEdit = false

' query string to execute
MM_editQuery = ""
%>
<%
' *** Insert Record: set variables

If (CStr(Request("MM_insert")) = "form1") Then

  MM_editConnection = MM_www_STRING
  MM_editTable = "order"
  MM_editRedirectUrl = "dd.asp"
  MM_fieldsStr  = "qn|value|qp|value|qy1|value|qy2|value|qy3|value|qy4|value|33a|value|34a|value|35a|value|36a|value|37a|value|38a|value|39a|value|40a|value|33b|value|34b|value|35b|value|36b|value|37b|value|38b|value|39b|value|40b|value|33c|value|34c|value|35c|value|36c|value|37c|value|38c|value|39c|value|40c|value|33d|value|34d|value|35d|value|36d|value|37d|value|38d|value|39d|value|40d|value|qb|value"
  MM_columnsStr = "number|',none,''|photo|',none,''|Black|none,'Y','N'|White|none,'Y','N'|Red|none,'Y','N'|yellow|none,'Y','N'|33a|',none,''|34a|',none,''|35a|',none,''|36a|',none,''|37a|',none,''|38a|',none,''|39a|',none,''|40a|',none,''|33b|',none,''|34b|',none,''|35b|',none,''|36b|',none,''|37b|',none,''|38b|',none,''|39b|',none,''|40b|',none,''|33c|',none,''|34c|',none,''|35c|',none,''|36c|',none,''|37c|',none,''|38c|',none,''|39c|',none,''|40c|',none,''|33d|',none,''|34d|',none,''|35d|',none,''|36d|',none,''|37d|',none,''|38d|',none,''|39d|',none,''|40d|',none,''|Remarks|',none,''"

  ' create the MM_fields and MM_columns arrays
  MM_fields = Split(MM_fieldsStr, "|")
  MM_columns = Split(MM_columnsStr, "|")
  
  ' set the form values
  For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
    MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i)))
  Next

  ' append the query string to the redirect URL
  If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
    If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
      MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
    Else
      MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
    End If
  End If

End If
%>
<%
' *** Insert Record: construct a sql insert statement and execute it

Dim MM_tableValues
Dim MM_dbValues

If (CStr(Request("MM_insert")) <> "") Then

  ' create the sql insert statement
  MM_tableValues = ""
  MM_dbValues = ""
  For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
    MM_formVal = MM_fields(MM_i+1)
    MM_typeArray = Split(MM_columns(MM_i+1),",")
    MM_delim = MM_typeArray(0)
    If (MM_delim = "none") Then MM_delim = ""
    MM_altVal = MM_typeArray(1)
    If (MM_altVal = "none") Then MM_altVal = ""
    MM_emptyVal = MM_typeArray(2)
    If (MM_emptyVal = "none") Then MM_emptyVal = ""
    If (MM_formVal = "") Then
      MM_formVal = MM_emptyVal
    Else
      If (MM_altVal <> "") Then
        MM_formVal = MM_altVal
      ElseIf (MM_delim = "'") Then  ' escape quotes
        MM_formVal = "'" & Replace(MM_formVal,"'","''") & "'"
      Else
        MM_formVal = MM_delim + MM_formVal + MM_delim
      End If
    End If
    If (MM_i <> LBound(MM_fields)) Then
      MM_tableValues = MM_tableValues & ","
      MM_dbValues = MM_dbValues & ","
    End If
    MM_tableValues = MM_tableValues & MM_columns(MM_i)
    MM_dbValues = MM_dbValues & MM_formVal
  Next
  MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & ") values (" & MM_dbValues & ")"

  If (Not MM_abortEdit) Then
    ' execute the insert
    Set MM_editCmd = Server.CreateObject(")
    MM_editCmd.ActiveConnection = MM_editConnection
    MM_ = MM_editQuery
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close

    If (MM_editRedirectUrl <> "") Then
      Response.Redirect(MM_editRedirectUrl)
    End If
  End If

End If
%>
<form ACTION="<%=MM_editAction%>" METHOD="POST" name="form1">
  <table width="1169" border="1">
    <tr>
      <th width="105" scope="col">编号</th>
      <th width="90" scope="col">图片</th>
      <th width="53" scope="col">颜色</th>
      <th width="617" scope="col">码数和数量</th>
      <th width="202" scope="col">备注</th>
      <th width="62" scope="col">&nbsp;</th>
    </tr>
    <tr>
      <td><label>
        <input name="qn" type="text" id="qn" size="15">
      </label></td>
      <td><label>
        <input name="qp" type="image" id="qp" src="file:///F|/www/00.jpg">
      </label></td>
      <td><p>黑色
        <label></label>
              <label>
              <input name="qy1" type="checkbox" id="qy1" value="Black">
              </label>
              <br>
        白色
        <label></label>
        <label>
          <input name="qy2" type="checkbox" id="qy2" value="White">
          </label>
        <br>
        红色
        <label></label>
        <label>
          <input name="qy3" type="checkbox" id="qy3" value="Red">
          </label>
        <br>
        黄色
        <label></label>
        <label>
          <input name="qy4" type="checkbox" id="qy4" value="yellow">
          </label>
      </p></td>
      <td>33
        <label>
          <input name="33a" type="text" id="33a" size="5">
          34
          <input name="34a" type="text" id="34a" size="5">
          35
          <input name="35a" type="text" id="35a" size="5">
          36
          <input name="36a" type="text" id="36a" size="5">
          37
          <input name="37a" type="text" id="37a" size="5">
          38
          <input name="38a" type="text" id="38a" size="5">
          39
          <input name="39a" type="text" id="39a" size="5">
          40
          <input name="40a" type="text" id="40a" size="5">
          </label>
          <p>33
            <label>
              <input name="33b" type="text" id="33b" size="5">
              34
              <input name="34b" type="text" id="34b" size="5">
              35
              <input name="35b" type="text" id="35b" size="5">
              36
              <input name="36b" type="text" id="36b" size="5">
              37
              <input name="37b" type="text" id="37b" size="5">
              38
              <input name="38b" type="text" id="38b" size="5">
              39
              <input name="39b" type="text" id="39b" size="5">
              </label>
            40
            <input name="40b" type="text" id="40b" size="5">
          </p>
        <p>33
          <label>
              <input name="33c" type="text" id="33c" size="5">
            34
            <input name="34c" type="text" id="34c" size="5">
            35
            <input name="35c" type="text" id="35c" size="5">
            36
            <input name="36c" type="text" id="36c" size="5">
            37
            <input name="37c" type="text" id="37c" size="5">
            38
            <input name="38c" type="text" id="38c" size="5">
            39
            <input name="39c" type="text" id="39c" size="5">
              </label>
          40
          <input name="40c" type="text" id="40c" size="5">
          </p>
        <p>33
          <label>
              <input name="33d" type="text" id="33d" size="5">
            34
            <input name="34d" type="text" id="34d" size="5">
            35
            <input name="35d" type="text" id="35d" size="5">
            36
            <input name="36d" type="text" id="36d" size="5">
            37
            <input name="37d" type="text" id="37d" size="5">
            38
            <input name="38d" type="text" id="38d" size="5">
            39
            <input name="39d" type="text" id="39d" size="5">
              </label>
          40
          <input name="40d" type="text" id="40d" size="5">
        </p></td>
      <td><label>
        <textarea name="qb" cols="20" id="qb"></textarea>
      </label></td>
      <td><label>
        <input type="submit" name="Submit" value="提交">
        </label>
          <br>
          <br>
          <label>
          <input type="reset" name="Submit2" value="重置">
        </label></td>
    </tr>
  </table>

  

  <input type="hidden" name="MM_insert" value="form1">
</form>
搜索更多相关主题的帖子: include title file 
2014-12-10 15:05
fux88
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2014-11-4
收藏
得分:0 
我这里是数据库的值和代码不充一么?
我是用DW的插入表单记录弄的。
直接套用进去的,是代码连接有问题,还是和数据库的值和代码不充一呢?那位大虾能指导下吗,谢谢
2014-12-10 17:01
fux88
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2014-11-4
收藏
得分:0 
coon.asp,
<%
Provider = "Provider=Microsoft.Jet.OLEDB.4.0;"
Path = "Data Source=" & Server.MapPath("mdb/info.mdb")
Set conn= Server.CreateObject("ADODB.Connection")
p1=Provider&Path
conn.Open P1
%>
2014-12-10 17:02
快速回复:登陆进去了,但表单提交没反映,那位大虾指教一下啊,这是下来修改的。 ...
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.015548 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved