<?php include("connect.php");?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"/> <title>Register</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <meta http-equiv=Content-Type content="text/html; charset=utf-8"> <style> body { background-color: #8c8c8c; } .texthand1{ font-size:20px; text-align: center; } </style> </head> <body> <?php session_start(); $textEmail=$_POST['textEmail']; $password=$_POST['password']; echo $textEmail."<br>"; echo $password."<br>"; $sql = "SELECT * FORM costomer_New WHERE email='$textEmail' and password='$password' "; $query = mysqli_query($con,$sql); if(!$query) { echo " คิวรี่ไม่ผ่าน"; } $numrow = mysqli_num_rows($query); if(!$numrow=="1") { ?>ไม่พบข้อมูล <!--<script> alert('invalid');</script> <script>window.location='login.php'</script>--> <?php } else if($numrow=="1") { $valuue = mysqli_fetch_array($query); $_SESSION["ses_userid"] = session_id(); $_SESSION['email']=$valuue["email"]; $_SESSION['cusID']=$valuue["cusID"]; if($valuue["country"]=="Thailand") { echo "<script type='text/JavaScript'> window.location = 'userindexTh.php' </script>"; } else { echo "<script type='text/JavaScript'> window.location = 'userindex.php' </script>"; } } ?> <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js" integrity="sha384-vFJXuSJphROIrBnz7yo7oB41mKfc8JzQZiCq4NCceLEaO4IHwicKwpJf9c9IpFgh" crossorigin="anonymous"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js" integrity="sha384-alpBpkh1PFOepccYVYDB4do5UnbKysX5WZXm3XxPqe5iKTfUKjNkCk9SaVuEZflJ" crossorigin="anonymous"></script> </body> </html>
define( 'ON_PRODUCTION'. false); // กำหนดทิศทางการแสดง error $query = mysqli_query($con,$sql); if(!$query) { echo " คิวรี่ไม่ผ่าน<br>".( ON_PRODUCTION ? '' : $sql. '<br>' . $con->error); }
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง