查看文件: member_id_edit.php
大小: 3.26 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")) { $updateSQL = sprintf("UPDATE member SET mem_passwd=%s, mem_name=%s, mem_mobile=%s WHERE mem_auto=%s", GetSQLValueString($_POST['mem_passwd'], "text"), GetSQLValueString($_POST['mem_name'], "text"), GetSQLValueString($_POST['mem_mobile'], "text"), GetSQLValueString($_POST['mem_auto'], "int")); mysql_select_db($database_BE2, $BE2); $Result1 = mysql_query($updateSQL, $BE2) or die(mysql_error()); $updateGoTo = $_POST["url"]; $write='資料已更新...'; // header(sprintf("Location: %s", $updateGoTo)); echo "<script>alert('".$write."');location.href='".$updateGoTo."';</script>"; } $colname_Rt2 = "-1"; if (isset($_GET['id'])) { $colname_Rt2 = (get_magic_quotes_gpc()) ? $_GET['id'] : addslashes($_GET['id']); } mysql_select_db($database_BE2, $BE2); $query_Rt2 = sprintf("SELECT * FROM member WHERE mem_auto = %s", $colname_Rt2); $Rt2 = mysql_query($query_Rt2, $BE2) or die(mysql_error()); $row_Rt2 = mysql_fetch_assoc($Rt2); $totalRows_Rt2 = mysql_num_rows($Rt2); ?> <div class="row"> <div class="col-md-12"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title">會員資料編輯</h3> </div> <form method="post" name="form1" action=""> <table width="419" align="center"> <tr valign="baseline"> <td width="144" align="right" nowrap><span class="s1">電話/帳號:</span></td> <td width="228"><input type="hidden" name="mem_auto" value="<?php echo $row_Rt2['mem_auto']; ?>" ><input type="text" name="mem_mobile" value="<?php echo $row_Rt2['mem_mobile']; ?>" ></td> <td width="31"> </td> </tr> <tr valign="baseline"> <td nowrap align="right"><span class="s1">密碼:</span></td> <td><input type="text" id="mem_passwd" name="mem_passwd" value="<?php echo $row_Rt2['mem_passwd']; ?>" size="32"></td> <td> </td> </tr> <tr valign="baseline"> <td nowrap align="right"><span class="s1">姓名:</span></td> <td><input type="text" id="mem_name" name="mem_name" value="<?php echo $row_Rt2['mem_name']; ?>" size="32" /></td> <td> </td> </tr> <tr valign="baseline"> <td nowrap align="right">註冊日期Idate:</td> <td> <?php echo $row_Rt2['mem_time']; ?> </td> <td> </td> </tr> <tr valign="baseline"> <td nowrap align="right"> </td> <td> <?= $row_Rt2['scode']; ?></td> <td> </td> </tr> <tr valign="baseline"> <td nowrap align="right"> </td> <td><input type="submit" value="更新記錄"></td> <td> </td> </tr> </table> <input type="hidden" name="MM_update" value="form1"> <input name="url" type="hidden" id="url" value="<?php echo $_SERVER['HTTP_REFERER']; ?>" /> </form> <div id="back"><a href="javascript:history.back();"><img src="images/back.gif" alt="回上一頁" title="回上一頁" width="115" height="32" border="0"></a></div> </div> </div> </div> <?php mysql_free_result($Rt2); ?>
保存
取消
返回文件列表