查看文件: tb2cityadd.php
大小: 2.87 KB
类型: application/octet-stream
<?php require('system/login.php'); ?> <?php require_once('../Connections/BE2.php'); ?> <?php if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) { $ec=explode(",",$_POST['ec1']); $insertkid = sprintf("INSERT INTO tb2city(buid2,ec1,ec3,bctaddr,bcttel) VALUES('%s','%s','%s','%s','%s')",$_POST['buid'],$ec[0],$ec[1],$_POST['bctaddr'],$_POST['bcttel']); mysql_select_db($database_BE2, $BE2); $Result1 = mysql_query($insertkid, $BE2) or die(mysql_error()); $write='資料已更新...'; echo "<script>alert('".$write."');</script>"; $updateGoTo =$_POST['url']; header(sprintf("Location: %s", $updateGoTo)); } mysql_select_db($database_BE2, $BE2); $query_Rt2 =sprintf("select c.bc2,c.bc3,c.bc4,a.* from tb2 as c,tb1 as a where c.buid='%s' order by a.tbc0,a.ec4",$_GET['id']); $Rt2 = mysql_query($query_Rt2, $BE2) or die(mysql_error()); $row_Rt2 = mysql_fetch_assoc($Rt2); $totalRows_Rt2 = mysql_num_rows($Rt2); // if($_SERVER['REMOTE_ADDR']=='220.130.43.121'){ echo $query_Rt2;} ?> <div class="font2"><? echo $row_Rt2['bc2']." ".$row_Rt2['bc3'].$row_Rt2['bc4'] ?></div> <div id="content" align="center"> <form id="form1" name="form1" method="post" action=""> <table width="46%" border="0" cellspacing="0" cellpadding="0"> <tr> <th height="33" align="center" valign="middle" nowrap="nowrap" class="font2">服務城市</th> <th valign="middle" nowrap="nowrap" class="font2">服務電話</th> <th align="center" valign="middle" class="font2">服務地址</th> <th align="center" valign="middle" class="font2"> </th> </tr> <tr> <th width="19%" align="center" valign="top" nowrap="nowrap" class="font3"> <label for="ec1"></label> <select name="ec1" id="ec1"> <?php do { ?> <option value="<?= $row_Rt2['ec1'].",".$row_Rt2['ec3']?>"><?= $row_Rt2['ec3']?></option> <?php } while ($row_Rt2 = mysql_fetch_assoc($Rt2)); ?> </select></th> <td width="23%" align="center" valign="top" class="font3"><input name="bcttel" type="text" id="bcttel" size="20" maxlength="20" /></td> <td width="48%" align="center" valign="top" class="font3"><input name="bctaddr" type="text" id="bctaddr" size="40" maxlength="40" /></td> <td width="10%" align="center" valign="top" class="font3"> </td> </tr> <tr> <td height="3" colspan="4" align="center" ><input type="submit" name="button" id="button" value="送出" /></td> </tr> </table> <input type="hidden" name="MM_update" value="form1" /> <input name="buid" type="hidden" id="buid" value="<?= $_GET['id'];?>" /> <input name="url" type="hidden" id="url" value="<?= $_SERVER['HTTP_REFERER']; ?>" /> </form> </div> <?php mysql_free_result($Rt2); ?>
保存
取消
返回文件列表