<?php $title="login system"; $dbhost="localhost"; $dbuser="root"; $dbpass="1234"; $c=mysql_connect($dbhost,$dbuser,$dbpass)or die(mysql_error()); mysql_query("set names 'tis620' ",$c); mysql_select_db("project"); $sqlSelectLogin=mysql_query("select * from e_member where m_user='$m_user' and m_pass='$m_pass' "); $rs=mysql_fetch_array($sqlSelectLogin); ?> <!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=windows-874" /> <title><?php echo $title; ?></title> <style> body{margin:0px; font-family:"MS Sans Serif"; font-size:12px} .border{border:solid 1px #CCCCCC;font-family:"MS Sans Serif"; font-size:14px;} </style> </head> <body> <p> </p> <body> <?php if($rs['m_user']!="" || $rs['m_pass']!=""){ if($rs['m_status']=="1"){ $status="Administrator"; }else if ($rs['m_status']=="2"){ $status="teacher"; }else if ($rs['m_status']=="3"){ $status="parent"; }else{ $status="student"; } echo"<table width=\"300\" border=\"0\" align=\"left\" class=\"border\"> <tr> <td colspan=\"2\" bgcolor=\"#CCE6FF\"> Profile Form </td> </tr> <tr> <td width=\"73\">No : </td> <td width=\"215\">$rs[m_no]</td> </tr> <tr> <td>ชื่อ-นามสกุล : </td> <td>$rs[m_user]</td> </tr> <tr> <td>รหัสประจำตัว : </td> <td>$rs[m_pass]</td> </tr> <tr> <td>สาขาวิชา : </td> <td>$rs[m_branch]</td> </tr> <tr> <td>สถานะ : </td> <td>$status</td> </tr> <tr> <td>ออกจากระบบ : </td> <td><a href=\"index.php\">Logout</a></td> </tr> </table>"; }else{ echo "<center><font color=red>ข้อมูลไม่ถูกต้อง!</font></center>"; echo"<meta http-equiv=\"Refresh\" content=\"3;URL=index.php\" target='_parent'/>"; } ?> </body> </html>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง