<?php
    
include("../include/FunctionDB.php");
    
ConnectDB();
  if (
$Teacher_code =='')
  {
     
$Username $_POST[Username];
     
$Teacher_code $_POST[Teacher_code];
     
$sql1 "Select * From personal_tb Where Username='$Username'";
     
$result1 mysql_query($sql1) or die("Error".mysql_error());
     
$rss mysql_fetch_array($result1);  
      
$Teacher_code $rss[Teacher_code];
  }
  
  
$sql "Select * From user_tb Where Teacher_code='$Teacher_code'";
  
$result mysql_query($sql) or die("Error".mysql_error());
  
$rs mysql_fetch_array($result);
?>


<html>
<head>
<title>Form Change password</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<link href="../css/style1.css" rel="stylesheet" type="text/css">
</head>

<body topmargin="0">
<table width="63%" border="0" align="center" cellpadding="0" cellspacing="1">
  <form action="UpdatePwd.php" method="post">
    <tr bgcolor="#FFFFFF"> 
      <td height="25" colspan="2"> <div align="center"><font size="2" face="Tahoma"><strong><font size="2">á¡éä¢ÃËÑʼèÒ¹¼Ùéãªé 
          &nbsp;</font></strong><? echo $rs[Teacher_code]; $Teacher_code;?></font></div></td>
    </tr>
    <tr bgcolor="#EEEEEE"> 
      <td> <div align="center"><font size="2" face="Tahoma">username</font></div></td>
      <td width="55%"><input name="Username" type="text" id="Username" value="<? echo $rs[Username]?>"></td>
    </tr>
    <tr bgcolor="#EEEEEE"> 
      <td> <div align="center"><font size="2" face="Tahoma">password à´ÔÁ</font></div></td>
      <td><div align="center"><strong><font color="#993333" size="2" face="Tahoma"><? echo $rs[PasswordR]?>&nbsp;</font></strong></div></td>
    </tr>
    <tr bgcolor="#EEEEEE"> 
      <td> <div align="center"><font size="2" face="Tahoma">password ãËÁè</font></div></td>
      <td><input name="NewPassword" type="text" id="NewPassword"></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td colspan="2"> <div align="center"> 
          <input type="hidden" name="Teacher_code" value="<? echo $rs[Teacher_code]?>">
          <input type="submit" name="Submit3" value="   ºÑ¹·Ö¡ " class="button">
          &nbsp;&nbsp; 
          <input type="button" name="Submit" value=" »Ô´Ë¹éÒµèÒ§" onClick="javascript:parent.close();" class="button1">
        </div></td>
    </tr>
  </form>
</table>
<div align="center">
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td>&nbsp;</td>
    </tr>
  </table>
  
</div>
</body>
</html>