查看文件: addtb3.php
大小: 2.7 KB
类型: application/octet-stream
<?php require_once('../Connections/BE2.php'); ?> <?php if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $insertSQL = sprintf("INSERT INTO tb5 (fe1,fekid, fe2, fe3,fe4,fe5) VALUES (%s, %s, %s, %s, %s, %s)", GetSQLValueString($_POST['fe1'], "int"), GetSQLValueString($_POST['fe2'], "int"), GetSQLValueString($_POST['fe2t'], "text"), GetSQLValueString($_POST['fe3'], "text"), GetSQLValueString($_POST['fe4'], "text"), GetSQLValueString($_POST['fe5'], "text")); mysql_select_db($database_BE2, $BE2); $Result1 = mysql_query($insertSQL, $BE2) or die(mysql_error()); $insertGoTo = $_POST['url']; header(sprintf("Location: %s", $insertGoTo)); } /* mysql_select_db($database_BE2, $BE2); $query_Rtc = "SELECT distinct(fe2) FROM tb5 where 1 order by fe1,fe2,fe4"; $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="618" align="center"> <tr valign="baseline"> <td align="right" nowrap="nowrap">選單:</td> <td><select name="fe1" id="fe1" onChange="setfe2()"> <option value="0">======</option> <option value="6">租車查詢</option> <option value="7">觀光旅遊</option> <option value="10">企業徵才</option> </select></td> </tr> <tr valign="baseline"> <td align="right" nowrap="nowrap"><span class="font2">項目:</span></td> <td><label for="fe1"></label> <select name="fe2" id="fe2" onchange="setfe2txt()" > </select> <input name="fe2t" type="hidden" id="fe2t" size="12" /></td> </tr> <tr valign="baseline"> <td width="33" align="right" nowrap="nowrap"><span class="font2">服務分類</span>:</td> <td width="357"><input name="fe3" type="text" id="fe3" size="32" /></td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right"><span class="font2">服務說明</span>:</td> <td><textarea name="fe5" cols="40" rows="6" id="fe5"></textarea></td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right"><span class="font2">排列序</span>:</td> <td><input name="fe4" type="text" id="fe4" value="" size="32" /></td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right"><input name="url" type="hidden" id="url" value="<? echo $_SERVER['HTTP_REFERER']?>" /></td> <td><input type="submit" value="插入記錄" /></td> </tr> </table> <input type="hidden" name="MM_insert" value="form1" /> </form>
保存
取消
返回文件列表