<?php session_start() ; /* add by kergrit(redthird.com) for compatible global variable off/on php.ini */ $user_login = $_POST['user_login']; $pwd_login = $_POST['pwd_login']; if(isset($user_login) and isset($pwd_login)) { include("config.inc.php") ; ?> <html> <head> <title>:: ผลการเข้าสู่ระบบ ::</title> <meta http-equiv="Content-Type" content="text/html; charset=windows-874"> </head> <body bgcolor="#FFFFCC"> <?php $result = mysql_query("select user,password from member where user='$user_login' and password='$pwd_login'"); $num = mysql_num_rows($result) ; if($num<=0) { echo "<br><br><center><font size='3' face='MS Sans Serif'><b>รหัสผ่านไม่ถูกต้องครับ</b></font></center>" ; print "<meta http-equiv=refresh content=3;URL=index.php>"; } else { $dbarr = mysql_fetch_array($result) ; if($user_login!=$dbarr['user'] and $pwd_login!=$dbarr['password']) { echo "รหัสผ่านไม่ถูกต้อง" ; }else { $_SESSION['login_true'] = $user_login; echo "<meta http-equiv='refresh' content='0 ;url=member_detail.php'>" ; } } } ?> </body> </html>
mysql_query("select user,password from member where user='$user_login' and password='$pwd_login'") or die(mysql_error());
mysql_connect(.....) mysql_select_db($db-name);
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง