查看文件: settb6add.php
大小: 2.64 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 tb6 ( fg1, fg2, fg3, fg4) VALUES (%s, %s, %s, %s)", GetSQLValueString($_POST['fg1'], "text"), GetSQLValueString($_POST['fg2'], "int"), GetSQLValueString($_POST['fg3'], "text"), GetSQLValueString($_POST['fg4'], "text")); mysql_select_db($database_BE2, $BE2); $Result1 = mysql_query($insertSQL, $BE2) or die(mysql_error()); $updateGoTo =$_POST['url'];// "main.php?act=user"; header(sprintf("Location: %s", $updateGoTo)); } mysql_select_db($database_BE2, $BE2); $query_Rtc = "SELECT * FROM tb6 where 1 order by fg2"; $Rtc = mysql_query($query_Rtc, $BE2) or die(mysql_error()); $row_Rtc = mysql_fetch_assoc($Rtc); $totalRows_Rtc = mysql_num_rows($Rtc); ?> <form action="" method="POST" name="form1" id="form1"> <table width="549" align="center"> <tr valign="baseline"> <td nowrap="nowrap" align="right"> </td> <td> </td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right"><span class="font2">分類說明:</span></td> <td><input name="fg1" type="text" id="fg1" size="32" /></td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right"><span class="font2">啟用</span>:</td> <td><label for="fg4"></label> <select name="fg3" id="fg3"> <option value="Y" selected="selected">Y</option> <option value="N">N</option> </select></td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right"><span class="font2">租車業使用</span>:</td> <td><label for="fg2"></label> <select name="fg4" id="fg4"> <option value="Y" selected="selected">Y</option> <option value="N">N</option> </select></td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right"><span class="font2">排列值</span>:</td> <td><input name="fg2" type="text" id="fg2" size="12" maxlength="5" /> </td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right"> </td> <td> </td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right"> </td> <td><input type="submit" value="插入新記錄" /></td> </tr> </table> <input name="url" type="hidden" id="url" value="<?= $_SERVER['HTTP_REFERER']; ?>" /> <input type="hidden" name="MM_insert" value="form1" /> </form> <?php mysql_free_result($Rtc); ?>
保存
取消
返回文件列表