<form name="login_customer" action="check login customer.php" onSubmit="JavaScript:return Submit();"> <body> <script language="javascript"> function Submit() { if(document.login_customer.Username.value == "") { alert('กรุณากรอกชื่อผู้ใช้'); document.login_customer.Username.focus(); return false; } if(document.login_customer.Password.value == "") { alert('กรุณากรอกรหัสผ่าน'); document.login_customer.Password.focus(); return false; } document.login_customer.submit(); } </script> <center><br /><p><img src="../img/header.jpg" width="1024" height="330" > <table width="1021" border="1" cellspacing="0" bordercolor="#f9928d"> <tr> <td width="269" height="696" align="center" valign="top" bgcolor="#f9928d"><table width="272" border="1" cellspacing="0" bordercolor="#330000"> <tr> <td width="266"><table width="267" height="235" border="0" cellspacing="0" bordercolor="#330000"> <tr> <th width="265" height="62" valign="middle" bgcolor="#330000"><center> <img src="../icon/สินค้า.png" width="48" height="48"><b><font color="#FFFFFF"> เข้าสู่ระบบ</b></center></th> </tr> <tr> <td height="171" bgcolor="#FFCC99"><table width="266" border="0"> <tr> <td width="17"> </td> <td width="107" height="27"><font size="2"> ชื่อผู้ใช้:</font></td> <td width="115"><input name="Username" type="text" id="Username" class="form-control"size="15"></td> <td width="9"> </td> </tr> <tr> <td> </td> <td height="29"><font size="2">รหัสผ่าน:</font></td> <td><input name="Password" type="Password" id="Password" size="15"></td> <td> </td> </tr> <tr> <td height="21" colspan="4"><center><font size="2"><a href="register_customer.php"><font color="#CC0000">สมัครสมาชิก</td> </tr> <tr> <td height="50" colspan="4"><center><button type="submit">เข้าสู่ระบบ</button></center></td> </tr> </table> </form> </table>
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> </html> <?php session_start(); $Username = $_POST['Username']; $Password = $_POST['Password']; include 'dbconnect.php'; $sql = "SELECT * FROM customer WHERE Username = '".$Username."' AND Password = '".$Password."'"; $query = mysql_query($sql); $result = mysql_fetch_array($query); $_SESSION["Username"] = $result["Username"]; session_write_close(); if ($result) { header("location:first page customer.php"); } else { header("location:login_customer_again.php"); } mysql_close(); ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง