ปริญญาโท :<td class="normal"><input name="year_y" type="text" id="year_y=2" size="10" />
ปริญญาโท :<td class="normal"><input name="year_y" type="text" id="year_y=2" size="10
<? session_start(); include('config.php'); ?> <!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=utf-8" /> <title>Untitled Document</title> </head> <body> <tr> <td bgcolor="#FF9900"><div align="center">เลือกปีการศึกษาที่ต้องการ</div></td> </tr> <tr> <td valign="top"><div align="center"> <table width="209" border="0" cellspacing="2" cellpadding="3"> <tr> <td width="58%"><? $yearSQL = "select distinct year_name,id from year order by year_name"; $yearQRY = mysql_db_query($dbname, $yearSQL); $a=0; while($yearRS = mysql_fetch_object($yearQRY)){ $year_name = $yearRS -> year_name; $id = $yearRS -> id; $a++; echo " <br><a href=\"show_year.php?cat=".$id."\">".$year_name."</b></a>"; echo "<hr size=1>"; ?> <? } ?></td> </tr> </table> </div></td> </tr> </body> </html>
<? session_start(); include('config.php'); ?> <!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> <? $yearSQL = "select * from year where id='".$cat."' order by id"; $yearQRY = mysql_db_query($dbname, $yearSQL); $a=0; while($yearRS = mysql_fetch_object($yearQRY)){ $year_name = $yearRS -> year_name; $id = $yearRS -> id; $a++; ?> <table width="77%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolor="#CCCCCC"> <tr bgcolor="#FFFFFF" onMouseOver="this.bgColor = '#FFE1FF'" onMouseOut="this.bgColor = '#FFFFFF'"> <td width="26%" bgcolor="#FF9900"><div align="center">ระดับ</div></td> <td width="12%" bgcolor="#FF9900"><div align="center">จำนวนนักศึกษา</div></td> <td width="12%" bgcolor="#FF9900"> </td> </tr> <? $degreeSQL = "select * from degree where year_y='".$id."' order by id"; $degreeQRY = mysql_db_query($dbname, $degreeSQL); $t=0; while($degreeRS = mysql_fetch_object($degreeQRY)){ $id = $degreeRS -> id; $degree_name = $degreeRS -> degree_name; $year_y = $degreeRS -> year_y; $total = $degreeRS -> total; $t++; ?> <tr bgcolor="#FFFFFF" onMouseOver="this.bgColor = '#FFE1FF'" onMouseOut="this.bgColor = '#FFFFFF'"> <td ><div align="left"><font color="#990000"> <? echo $degree_name; ?></font></div></td> <td><div align="center"><font color="#990000"><? echo $total; ?></font></div></td> <td><label></label> <form action="save_year.php" method="post" enctype="multipart/form-data" name="form2" target="xData"> <input name="id" type="hidden" id="id" value="<?=$id; ?>" /> <input name="id1" type="hidden" id="id1" value="<?=$year_y; ?>" /> <input name="total" type="text" id="total" value="<?=$total;?>" size="5" /> <input type="submit" name="button" id="button" value="บันทึก" /> </form> </td> </tr> <? }} ?> </table> <div align="center"></div> </body> </html>
<? session_start(); include('config.php'); ?> <meta http-equiv="Content-Type" content="text/html; charset=windows-874" /> <? if($id<1){ $yearSQL = "insert into degree set degree_name='$degree_name', year_y='$year_y', total='$total'"; mysql_db_query($dbname, $yearSQL); $id = mysql_insert_id(); } else { $yearSQL = "update degree set total='$total' where id='".$id."'"; mysql_db_query($dbname, $yearSQL); } echo "<script>alert('ระบบบันทึกข้อมูลเรียบร้อยแล้ว'); window.parent.location='show_year.php?cat=".$id1."';</script>"; ?>
<? $hostname = "localhost"; $dbuser = "root"; $dbpassword = "1234"; $dbname = "degree"; mysql_connect($hostname, $dbuser, $dbpassword) or die("Don't Connect Database"); mysql_select_db($dbname)or die("Don't Connect Database!!"); mysql_query("set NAMES tis620 "); ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง