<table width="900" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><table width="893" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> <tr> <td><?php include("../header/header_sup.php"); ?></td> </tr> <tr> <td><form name="form1" method="post" action="admin_check.php"> <div align="center"> <br> <table width="30%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#f0f0f0"> <tr> <td><table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#f0f0f0"> <tr> <td colspan="2" align="center" bgcolor="#f0f0f0"><span class="style1"> <span class="style5">สำหรับผู้ดูเเลระบบ</span></span></td> </tr> <tr> <td width="112" align="right"><span class="style8"><span class="style10">ชื่อผู้เข้าระบบ</span> : </span></td> <td width="146" align="left"><input type="text" name="txtuser" id="txtuser" /></td> </tr> <tr> <td width="112" align="right"><span class="style8">รหัสผ่าน : </span></td> <td align="left"><input type="password" name="txtpassword" id="txtpassword" /></td> </tr> <tr> <td colspan="2" align="center"><input type="submit" name="submit" id="submit" value="เข้าสู่ระบบ" /> <input name="status" type="hidden" id="status" value="1"></td> </tr> </table></td> </tr> </table> <br> </div> </form></td> </tr> </table></td> </tr> </table><?php include("../header/underr.php")?>
<?php header("Content-Type: text/html; charset=utf-8"); $pusername=$_POST["txtuser"]; $ppassword=$_POST["txtpassword"]; include("../connect/connect.inc"); $table = mysql_query("select * from admin where (username = '$pusername') and (password = '$ppassword')") or die ("Can't Query Data" ); $countrecord = mysql_num_rows($table); include("../connect/disconnect.inc"); if ($countrecord == 0) { ?> <script language="javascript"> location = "admin.php"; alert("\"ชื่อผู้ใช\้\" และ \"รหัสผ่าน\" ไม่ถูกต้อง"); </script> <?php } else { session_start(); $field = mysql_fetch_array($table); session_register("sess_idm"); session_register("sess_userm"); session_register("sess_idstatp"); $_SESSION["sess_idm"] = $field["id_admin"]; $_SESSION["sess_userm"] = $field["userm"]; $_SESSION["sess_idstatp"] = $field["idstatp"]; ?> <script language="javascript"> location = "admin_welcom.php"; </script> <?php } ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> </body> </html>
$field = mysql_fetch_array($table); echo "<pre>"; print_r($field); exit;
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง