Viewing file: FrmEditProb.php (7.35 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php include("../../Include/FunctionDB.php"); include("../../include/Function.php"); ConnectDB(); $sql = "Select * From student_tb Where Student_id='$Student_id'"; $result = mysql_query($sql) or die("Error".mysql_error()); $rs = mysql_fetch_array($result); /////////////// $sql1 = "Select * From advice_problem_tb Where Student_id='$Student_id' AND Prob_code='$Prob_code'"; $result1 = mysql_query($sql1) or die("Error".mysql_error()); $row = mysql_fetch_array($result1); ?> <html> <head> <title>Edit Student Problem</title> <link rel="stylesheet" href="../../css/style1.css" type="text/css"> <meta http-equiv="Content-Type" content="text/html; charset=windows-874"> </head>
<body bgcolor="#FFFFFF"> <table width="95%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#006699"> <tr bgcolor="#B8ECB3"> <td colspan="4"> <div align="center"><strong><font color="#FF0000" size="4" face="Tahoma">á¡éä¢</font><font color="#003366" size="4" face="Tahoma"> ẺºÑ¹·Ö¡»ÑËҢͧ¹Ñ¡ÈÖ¡ÉÒ</font></strong></div></td> </tr> <form action="EditProb.php" method="post"> <tr bgcolor="#EEEEEE"> <td><div align="center"><font color="#003366" size="2" face="Tahoma">ÃËÑʹѡÈÖ¡ÉÒ</font></div></td> <td bordercolor="#006699"> </td> <td colspan="2" bordercolor="#006699"><strong><font color="#993333" size="2" face="Tahoma"><? echo $rs[Student_id]?> </font></strong></td> </tr> <tr bgcolor="#EEEEEE"> <td width="24%"> <div align="center"><font color="#003366" size="2" face="Tahoma">ª×èÍ</font></div></td> <td width="1%" bordercolor="#006699"> </td> <td colspan="2" bordercolor="#006699"><font size="2" face="Tahoma"><? echo $rs[First_name]?> <? echo $rs[Name]?> <? echo $rs[Lastname]?> </font></td> </tr> <tr bgcolor="#EEEEEE"> <td><div align="center"><font color="#003366" size="2" face="Tahoma">»ÑËÒ</font></div></td> <td bordercolor="#006699"> </td> <td colspan="2" bordercolor="#006699"><font size="2" face="Tahoma"> <input type="radio" name="Problem" <?php if (!(strcmp("$row[Problem]",1))) {echo "checked";} ?> value="1"> ÁÕ <input type="radio" name="Problem" <?php if (!(strcmp("$row[Problem]",0))) {echo "checked";} ?> value="0"> äÁèÁÕ</font></td> </tr> <tr bgcolor="#EEEEEE"> <td rowspan="5" bgcolor="#EEEEEE"> <div align="center"> <p><font color="#003366" size="2" face="Tahoma">»ÃÐàÀ·»ÑËÒ</font></p> <p> </p> </div></td> <td bordercolor="#006699"> </td> <td bordercolor="#006699" bgcolor="#EEEEEE"> </td> <td bordercolor="#006699"><div align="center"><font size="2" face="Tahoma">ÃÒÂÅÐàÍÕ´»ÑËÒ</font></div></td> </tr> <tr bgcolor="#EEEEEE"> <td height="22" bordercolor="#006699"> </td> <td width="11%" bordercolor="#006699" bgcolor="#EEEEEE"> <font size="2" face="Tahoma"> <input name="Prob1" type="checkbox" id="Prob1" <?php if (!(strcmp("$row[Prob1]",¡ÒÃàÃÕ¹))) {echo "checked";} ?> value="¡ÒÃàÃÕ¹"> ¡ÒÃàÃÕ¹</font></td> <td width="64%" bordercolor="#006699"><font size="2" face="Tahoma"> <input name="Prob_detail1" type="text" id="Prob_detail1" value="<? echo $row[Prob_detail1]?>" size="60"> </font></td> </tr> <tr bgcolor="#EEEEEE"> <td height="20" bordercolor="#006699"> </td> <td bordercolor="#006699" bgcolor="#EEEEEE"> <font size="2" face="Tahoma"> <input name="Prob2" type="checkbox" id="Prob2" <?php if (!(strcmp("$row[Prob2]",àÈÃÉ°¡Ô¨))) {echo "checked";} ?> value="àÈÃÉ°¡Ô¨"> àÈÃÉ°¡Ô¨</font></td> <td bordercolor="#006699"><input name="Prob_detail2" type="text" id="Prob_detail2" value="<? echo $row[Prob_detail2]?>" size="60"></td> </tr> <tr bgcolor="#EEEEEE"> <td height="20" bordercolor="#006699"> </td> <td bordercolor="#006699" bgcolor="#EEEEEE"> <font size="2" face="Tahoma"> <input name="Prob3" type="checkbox" id="Prob3" <?php if (!(strcmp("$row[Prob3]",ÊØ¢ÀÒ¾))) {echo "checked";} ?> value="ÊØ¢ÀÒ¾"> ÊØ¢ÀÒ¾</font></td> <td bordercolor="#006699"><input name="Prob_detail3" type="text" id="Prob_detail3" value="<? echo $row[Prob_detail3]?>" size="60"></td> </tr> <tr bgcolor="#EEEEEE"> <td height="20" bordercolor="#006699"> </td> <td bordercolor="#006699" bgcolor="#EEEEEE"> <font size="2" face="Tahoma"> <input name="Prob4" type="checkbox" id="Prob4" <?php if (!(strcmp("$row[Prob4]",ÊèǹµÑÇ))) {echo "checked";} ?> value="ÊèǹµÑÇ"> ÊèǹµÑÇ</font></td> <td bordercolor="#006699"><input name="Prob_detail4" type="text" id="Prob_detail4" value="<? echo $row[Prob_detail4]?>" size="60"></td> </tr> <tr bgcolor="#EEEEEE"> <td height="20"><div align="center"><font color="#003366" size="2" face="Tahoma">ÇÔ¸Õ¡ÒÃá¡é»ÑËÒ/¤Óá¹Ð¹Ó</font></div></td> <td bordercolor="#006699"> </td> <td colspan="2" bordercolor="#006699"> <p> <textarea name="Recom" cols="60" rows="5" id="Recom"><? echo $row[Recom]?></textarea> </p></td> </tr> <tr bgcolor="#EEEEEE"> <td><div align="center"><font color="#003366" size="2" face="Tahoma">Çѹ·ÕèÁÒ¾º</font></div></td> <td bordercolor="#006699"> </td> <td colspan="2" bordercolor="#006699"><font color="#000000" size="2" face="Tahoma"> <select name="mDate" id="mDate" class="input1" > <?php $Date_meet = $row[Date_meet]; $yearthai = explode("-",$Date_meet); $mDate = intval($yearthai[2]); $mMonth = intval($yearthai[1]); $mYear = intval($yearthai[0]); for($i=0;$i<=31;$i++) { if( $i == 0) echo"\n\t<option value=\"$mDate\" selected>$mDate</option>\n "; else echo"\n\t<option value=\"$i\">$i</option>\n "; } // getDay1to31(); ?> </select> </font><font size="2" face="Tahoma"> à´×͹ </font><font color="#000000" size="2" face="Tahoma"> <select name="mMonth" id="select" class="input1" > <?php $Date_meet = $row[Date_meet]; $yearthai = explode("-",$Date_meet); $mDate= intval($yearthai[2]); $Month = intval($yearthai[1]); $mYear = intval($yearthai[0]); $mMonth = $Month; $CMonth = TxtThaiMonth($Month); for($i=-1;$i<=11;$i++) { $a = $i+1; if( $a == 0) echo"\n\t<option value=\"$mMonth\" selected>$CMonth</option>\n "; else echo"\n\t<option value=\"$a\">$ThaiMonth[$i]</option>\n "; } // getThaiMonth(); ?> </select> </font><font size="2" face="Tahoma"> »Õ ¾.È. <input name="mYear" type="text" id="mYear" value="<? echo $mYear ?>" size="5" class="input1"> </font></td> </tr> <tr bgcolor="#B8ECB3"> <td colspan="4"> <div align="center"> <input name="Prob_code" type="hidden" id="Student_id" value="<? echo $row[Prob_code]?>"> <input name="Student_id" type="hidden" id="Student_id" value="<? echo $rs[Student_id]?>"> <input type="submit" name="Submit3" value=" à¾ÔèÁ "> <input type="reset" name="Submit22" value=" à¤ÅÕÂÃì "> </div></td> </tr> </form> </table> </body> </html>
|