查看文件: user_add.php
大小: 2.69 KB
类型: application/octet-stream
<?php require('system/login.php'); ?> <?php require_once('../Connections/BE2.php'); ?> <?php if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $insertSQL = sprintf("INSERT INTO `user` (name, passwd,stat,level, website) VALUES (%s, %s, %s, %s, %s)", GetSQLValueString($_POST['name'], "text"), GetSQLValueString($_POST['passwd'], "text"), GetSQLValueString($_POST['stat'], "text"), GetSQLValueString($_POST['level'], "text"), GetSQLValueString($_POST['website'], "text")); mysql_select_db($database_BE2, $BE2); $Result1 = mysql_query($insertSQL, $BE2) or die(mysql_error()); $insertGoTo =$_POST['url'];// "main.php?act=user";"main.php?act=user"; header(sprintf("Location: %s", $insertGoTo)); } ?> <form action="" method="post" name="form1" id="form1"> <table width="36%" align="center"> <tr valign="baseline"> <th width="5%" height="38" align="right" valign="top" nowrap="nowrap">帳 號:</th> <td width="95%" valign="baseline"><input name="name" type="text" id="name" value="" size="32" /></td> </tr> <tr valign="baseline"> <th height="30" align="right" valign="top" nowrap="nowrap">密 碼:</th> <td valign="baseline"><input name="passwd" type="text" id="passwd" value="" size="32" /></td> </tr> <tr valign="baseline"> <td height="30" align="center" valign="middle" nowrap="nowrap">GROUP:</td> <td height="30" align="left" valign="middle" nowrap="nowrap"><label for="stat"></label> <select name="stat" id="stat"> <option value="A">A</option> <option value="B">B</option> <option value="C">C</option> </select></td> </tr> <tr valign="baseline"> <td height="30" align="center" valign="middle" nowrap="nowrap">L V :</td> <td height="30" align="left" valign="middle" nowrap="nowrap"><select name="level" id="level"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> </select> <label for="radio"></label></td> </tr> <tr valign="baseline"> <td height="40" colspan="2" align="center" valign="middle" nowrap="nowrap"><input type="submit" value="新增使用者" /></td> </tr> </table> <input type="hidden" name="MM_insert" value="form1" /> <input type="hidden" name="website" value="288twtest1" /> <input name="url" type="hidden" id="url" value="<?= $_SERVER['HTTP_REFERER']; ?>" /> </form>
保存
取消
返回文件列表