<?php // 1. Receive data $user = trim($_POST[user]); $pass = trim($_POST[pass]); // 2. check user & pass & // user $sql = "select * from customer as c inner join cutomer_status as cs on c.csid = cs.csid where cusername = '$user'"; $result = mysql_query($sql) or exit($sql); $row = mysql_fetch_array($result); if (empty($row[cusername])) alertgo("This username doesn\'t found in system.","login.php"); if ($row[cpassword]!=md5($pass)) alertgo("This password is incorrect.","login.php"); // login complete $_SESSION["s_register"] = ""; $_SESSION["s_username"] = $row [cusername]; $_SESSION["s_cstatus"] = $row [csname]; $_SESSION["s_cuserid"] = $row [csid]; $_SESSION["s_point"] = $row [point]; alertgo("Welcome $row[cname]","index.php"); ?>
<?php }else{ echo "Welcome : ".$_SESSION["s_username"]."<br> Status : ".$_SESSION["s_cstatus"]."<br> Point : ".$_SESSION["s_point"]."<br> <a href='checkout.php'>Checkout</a> | <a href='myaccount.php'>Edit my account</a> | <a href='logout.php'>Logout</a> "; }?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง