查看文件: bussman_add.php
大小: 2.62 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 `buser` (name, aname, stat, mail, tel) VALUES (%s, %s, %s, %s, %s)", GetSQLValueString($_POST['name'], "text"), GetSQLValueString($_POST['aname'], "text"), GetSQLValueString($_POST['stat'], "text"), GetSQLValueString($_POST['mail'], "text"), GetSQLValueString($_POST['tel'], "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"><span class="font1">使用者帳號</span>:</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"><span class="font1">姓名</span>:</th> <td valign="baseline"><input name="aname" type="text" id="aname" value="" size="32" /></td> </tr> <tr valign="baseline"> <th height="30" align="right" valign="middle" nowrap="nowrap"><span class="font1">連絡電話:</span></th> <td height="30" align="left" valign="middle" nowrap="nowrap"><input name="tel" type="text" id="tel" value="" size="32" /></td> </tr> <tr valign="baseline"> <th height="30" align="right" valign="middle" nowrap="nowrap">Email:</th> <td height="30" align="left" valign="middle" nowrap="nowrap"><label for="stat"> <input name="mail" type="text" id="mail" value="" size="32" /> </label></td> </tr> <tr valign="baseline"> <td height="30" align="center" valign="middle" nowrap="nowrap"> </td> <td height="30" align="left" valign="middle" nowrap="nowrap"><label for="radio"></label></td> </tr> <tr valign="baseline"> <td height="40" colspan="2" align="center" valign="middle" nowrap="nowrap"><input name="stat" type="hidden" id="stat" value="C" size="32" /> <input type="submit" value="新增使用者" /></td> </tr> </table> <input type="hidden" name="MM_insert" value="form1" /> <input name="url" type="hidden" id="url" value="<?= $_SERVER['HTTP_REFERER']; ?>" /> </form>
保存
取消
返回文件列表