<?php session_start(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>::กำลังเข้าระบบ::</title> </head> <body> <table align="center"> <tr> <td align="center"> <font face="MS Sans Serif" size="2"> <?php $user=$_REQUEST["user"]; $password=$_REQUEST["password"]; $strCheck=$_REQUEST["strCaptcha"]; if($user=="" || $password=="" || $strCheck==""){ echo 'กรุณากรอกข้อมูลด้วยค่ะ <meta http-equiv="Refresh" content="5; URL=login.html">'; } if($_SESSION[MyKey]!==$strCheck){ echo 'โค้ดไม่ถูกต้องค่ะ <meta http-equiv="Refresh" content="5; URL=login.html">'; }else{ include "../connect.php"; mysql_query("SET NAMES UTF8"); $strSQL = "SELECT * FROM employee WHERE Id_Emp = '".$user."' and Id_Emp = '".$password."'"; $ObjQuery=mysql_query($strSQL) or die ("Error Query [".$strSQL."]"); $Result=mysql_num_rows($ObjQuery) or die ("Error Query [".$Result."]"); if($Result=0){ echo 'ชื่อเข้าใช้หรือรหัสผ่านไม่ถูกต้องค่ะ <meta http-equiv="Refresh" content="5; URL=login.html">'; }else{ $_SESSION["user"] = $user; $_SESSION["password"] = $password; echo 'กำลังเข้าสู่ระบบ <meta http-equiv="Refresh" content="5; URL=default.php">'; } ?> </font> </td> </tr> <tr> <td align="center"> <img src="../Image/admin/loading.gif" border="0" width="190" height="14" /> </td> </tr> <?php } ?> </table> </body> </html>
Error Query [SELECT * FROM employee WHERE Id_Emp = 'test' and Id_Emp = 'testpass']
<?php session_start(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>::กำลังเข้าระบบ::</title> </head> <body> <table align="center"> <tr> <td align="center"> <font face="MS Sans Serif" size="2"> <?php $user=$_REQUEST["user"]; $password=$_REQUEST["password"]; $strCheck=$_REQUEST["strCaptcha"]; if($user=="" || $password=="" || $strCheck==""){ echo 'กรุณากรอกข้อมูลด้วยค่ะ <meta http-equiv="Refresh" content="5; URL=login.html">'; }else{ ///ผมว่าน่าจะเป็นตรงนี้ครับ if($_SESSION[MyKey]!==$strCheck){ echo 'โค้ดไม่ถูกต้องค่ะ <meta http-equiv="Refresh" content="5; URL=login.html">'; }else{ include "../connect.php"; mysql_query("SET NAMES UTF8"); $strSQL = "SELECT * FROM employee WHERE Id_Emp = '".$user."' and Id_Emp = '".$password."'"; $ObjQuery=mysql_query($strSQL) or die ("Error Query [".$strSQL."]"); $Result=mysql_num_rows($ObjQuery) or die ("Error Query [".$Result."]"); if($Result=0){ echo 'ชื่อเข้าใช้หรือรหัสผ่านไม่ถูกต้องค่ะ <meta http-equiv="Refresh" content="5; URL=login.html">'; }else{ $_SESSION["user"] = $user; $_SESSION["password"] = $password; echo 'กำลังเข้าสู่ระบบ <meta http-equiv="Refresh" content="5; URL=default.php">'; } } ///ผมว่าน่าจะเป็นตรงนี้ครับ ?> </font> </td> </tr> <tr> <td align="center"> <img src="../Image/admin/loading.gif" border="0" width="190" height="14" /> </td> </tr> <?php } ?> </table> </body> </html>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง