一般不是表单不好用了。估计是你没有使用$_POST和$_GET来取表单数据。切记不要直接使用$form_element来取数据。这是受服务器设定影响的,而且不安全。

解决方案 »

  1.   

    <form name="form1" method="post" action="" enctype="multipart/form-data">
    这样有问题吗?
      

  2.   

    可是为什么传到服务器上就提交不上去呢?
    也不有提示,代码也不往下执行了
    <?php
    session_start();
    if(!isset($Action)||$Action!="login") $_SESSION["Name"] = "";
    ?>
    <? 
    include '../include/conn.php';
    if(isset($strName)) {
    $result = mysql_query("SELECT strName FROM default.adminlogin where strName = '$strName' and strPassword = '$strPassword'",$hDB);
    $num_rows = mysql_num_rows($result);
    if($num_rows > 0) {
    $_SESSION["Name"] = "$%^#@$@#&SDF!@EESA456@";
         Header("Location: Admin.php");
    } else {
    echo "<script language=javascript>alert('密码错误');</script>";
    }                                           
    }
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Login</title>
    <link href="style.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <table width="100%" height="600" border="0" cellpadding="0" cellspacing="0" bgcolor="#99CCCC">
      <tr>
        <td align="center" valign="middle">
    <form id="form1" name="form1" method="post" action="">
    <input name="action" type="hidden" value="login" />
          <table width="20%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="30" align="right">Name:</td>
              <td height="30"><input name="strName" type="text"/></td>
            </tr>
            <tr>
              <td width="37%" height="30" align="right">Password:</td>
              <td width="63%" height="30"><input name="strPassword" type="password" id="strPassword" /></td>
            </tr>
            <tr>
              <td height="30" colspan="2" align="right"><input type="submit" name="Submit" value="Login" /></td>
            </tr>
          </table>
            </form>
        </td>
      </tr>
    </table>
    </body>
    </html>
    上面是我login的原码现在什么不输入提交也不报错
    输入用户名和密码也不提交不知道为什么