<!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"> <? include "../../includes/config.inc.php"; ?> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <link href="../../css/cssST.css" rel="stylesheet" type="text/css" /> </head> <body> <form id="form1" name="form1" method="post" action="insert.php?"> <div align="center"> <table width="499" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="176"> </td> <td width="13"> </td> <td width="310"> </td> </tr> <tr> <td align="right" valign="middle">แผนก</td> <td> </td> <td align="left" valign="middle"><input type="text" name="depart" id="textfield2" class="box" /></td> </tr> <tr> <td align="right" valign="middle"> </td> <td> </td> <td> </td> </tr> <tr> <td align="right" valign="middle"><input type="submit" name="Submit" id="Submit" value="Submit" class="botton" /> <input name="hidAction" type=hidden value="Add" size=20 maxlength=20 /></td> <td> </td> <td align="left" valign="middle"><input type="reset" name="cancel" id="cancel" value="cancel" class="botton"/></td> </tr> </table> <p> </p> <? $strSQL = "SELECT * FROM vcj_department"; $objQuery = mysql_query($strSQL); ?> <table width="543" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="47" align="center" valign="middle">ID</td> <td width="253" align="center" valign="middle">แผนก</td> <td width="141" align="center" valign="middle">วันที่</td> <td width="46" align="center" valign="middle"></td> <td width="56" align="center" valign="middle"></td> </tr> <? while($objResult = mysql_fetch_array($objQuery)) { ?> <tr> <td align="center" valign="middle"><?=$objResult["idDe"];?></td> <td align="center" valign="middle"><?=$objResult["department"];?></td> <td align="center" valign="middle"><?=$objResult["date"];?></td> <td align="center" valign="middle"><a href="EditDe.php?ID=<?=$objResult["idDe"];?>">Edit</a></td> <td align="center" valign="middle"><a href="JavaScript:if(confirm('ต้องการลบข้อมูลนี้หรือไม่?')==true){window.location='DelDe.php?ID=<?=$objResult["idDe"];?>';}">Delete</a></td> </tr> <? } ?> </table> <p> </p> </div> </form> </body> </html>
<!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"> <? include "../../includes/config.inc.php"; ?> <? $strSQL = "SELECT * FROM vcj_department WHERE idDe = '".$_GET["ID"]."' "; $objQuery = mysql_query($strSQL); $r = @mysql_fetch_array($objQuery); echo $r_id - $r[idDe]; $r_department = $r[department]; ?> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <link href="../../css/cssST.css" rel="stylesheet" type="text/css" /> </head> <body> <div align="center"> <form id="form1" name="form1" method="post" action="update.php?IDU=<? $r_id;?>"> <table width="499" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="176"> </td> <td width="13"> </td> <td width="310"> </td> </tr> <tr> <td align="right" valign="middle">แผนก</td> <td> </td> <td align="left" valign="middle"><input name="departmentE" type="text" class="box" id="textfield2" value="<?=$r_department;?>" /></td> </tr> <tr> <td align="right" valign="middle"> </td> <td> </td> <td> </td> </tr> <tr> <td align="right" valign="middle"><input type="submit" name="Submit" id="Submit" value="Submit" class="botton" /> <input name="hidAction" type="hidden" value="Edit" size="20" maxlength="20" /></td> <td> </td> <td align="left" valign="middle"><input type="reset" name="cancel" id="cancel" value="cancel" class="botton"/></td> </tr> </table> </form> </div> </body> </html>
<? include "../../includes/function.inc.php"; ?> <? include "../../includes/config.inc.php"; ?> <? echo $department = $_POST['departmentE']; $date=date("Y-m-d"); echo $strSQL = "UPDATE vcj_department SET department='$department',date='$date' WHERE idDe = '".$_GET["IDU"]."' "; $objQuery = mysql_query($strSQL); JSError(3, "", "addDe.php"); ?>
$strSQL = "SELECT * FROM vcj_department WHERE idDe = '".$_GET["ID"]."' "; $objQuery = mysql_query($strSQL); $r = @mysql_fetch_array($objQuery); echo $r_id - $r[idDe]; <<<< ค่า r_id ครับ $r_department = $r[department];
$strSQL = "SELECT * FROM vcj_department WHERE idDe = '".$_POST["ID"]."' ";
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง