<?php session_start(); if(!session_is_registered('loginname')){ header("location:formlogin.php"); } echo $_SESSION['loginname'];echo nl2br (""); echo $_SESSION['pw']; $name = $_SESSION['loginname']; $pass = $_SESSION['pw']; ?> <? $host="localhost"; $user="root"; $pw="12345"; $db="rimes1"; mysql_connect($host,$user,$pw) or die(mysql_error()); mysql_query("set NAMES tis620"); $result = mysql_select_db($db) or die(mysql_error()); ?> <!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>Untitled Document</title> </head> <body> <center> <p> </p> <table width="1342" height="216" border="1"> <tr> <td height="96" colspan="13">Edit Table</td> </tr> <tr> <td width="43" align="center" valign="middle">NO.</td> <td width="21" align="center" valign="middle">User_id</td> <td width="21" align="center" valign="middle">DAY</td> <td width="117" height="47" align="center" valign="middle">Nomal date</td> <td width="133" align="center" valign="middle">Nomal time in</td> <td width="141" align="center" valign="middle">Nomal time Out</td> <td width="125" align="center" valign="middle">Shift date </td> <td width="128" align="center" valign="middle">shift time in </td> <td width="130" align="center" valign="middle">shift date time out</td> <td width="111" align="center" valign="middle">Delete</td> </tr> <? $sql = "select * from user_table "; $nongA = mysql_query($sql); while ($test =mysql_fetch_array($nongA)){ ?> <tr> <td width="43" align="center" valign="middle"><? echo $test['fname'];?></td> <td width="21" align="center" valign="middle"><? echo $test ['user_id'] ;?></td> <td width="21" align="center" valign="middle"><? echo $test['lname']; ?></td> <td><? echo $test['position'];?></td> <td><? echo $test['username'];?></td> <td><? echo $test['password'];?></td> <td><? echo $test['startdate'];?></td> <td width="128"><? echo $test['enddate'];?></td> <td width="130" align="center" valign="middle"><? echo $test['gradeandstep'];?></td> <td width="20" align="center"><a href="deleteuser1.php?id=<? echo $test['user_id'] ?>">Delete</a></td> </tr> <? } ?> </table> </center> </body> </html>
<? session_start(); include "./include/connect1.php"; session_register("sess_id"); header("location :deleteuser.php"); ?> <style type="text/css"> <!-- a:link { color: #FFFFFF; text-decoration: none; } a:visited { text-decoration: none; } a:hover { text-decoration: none; } a:active { text-decoration: none; } .style1{ font-size:15px; font-weight:bold; } .style2 { font-size: 16px; font-weight:bold; color: #4A2616; } .style26 {font-family: "Angsana New", Batang, "Bodoni MT", Calibri; font-size: 20px; font-weight: bold; } .style28 {font-family: "Angsana New", Batang, "Bodoni MT", Calibri; font-size: 20px; } --> </style> <form action="" method="post"><table width="100%" border="0" cellspacing="0"> <? $id=$_GET['user_id']; $sql="select * from user_table where user_id = '$id' "; $a=mysql_query($sql); $read=mysql_fetch_array($a); ?> <? echo $id ; ?> <? $id = $read['user_id'] ; ?> <? $sql = " delete from user_table where user_id = '$id' "; mysql_query($sql) ; ?> </table> <p> </p> </table></form></td></tr>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง