<?
include "connect.php";
$sql="use it";
$result=mysql_query($sql);
$sql="select * from std where std_id='$std_id'";
$result=mysql_query($sql);
$data=mysql_fetch_array($result);
$std_id=$data['std_id'];
$std_name=$data['std_name'];
$std_fname=$data['std_fname'];
$std_add=$data['std_add'];
$std_pic=$data['std_pic'];
?>
<html>
<head>
<title>เพิ่มข้อมูลลงในฐานข้อมูล</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
</head>
<body>
<p align="center">แก้ไขข้อมูลนักศึกษา</p>
<form name="form1" method="post" action="edit_add.php">
  <table width="46%" border="0" align="center">
    <tr> 
      <td width="27%"><div align="right">รหัสประจำตัว :</div></td>
      <td width="73%"> <input name="std_id" type="text" id="std_id" value="<?=$std_id?>" size="20" maxlength="10"></td>
    </tr>
    <tr> 
      <td><div align="right">ชื่อ :</div></td>
      <td><input name="std_name" type="text" id="std_name" value="<?=$std_name?>" size="50" maxlength="50"></td>
    </tr>
    <tr> 
      <td><div align="right">นามสกุล :</div></td>
      <td><input name="std_fname" type="text" id="std_fname" value="<?=$std_fname?>" size="50" maxlength="50"></td>
    </tr>
    <tr> 
      <td><div align="right">ที่อยู่ :</div></td>
      <td><textarea name="std_add" cols="50" rows="2" id="std_add"><?=$std_add?></textarea></td>
    </tr>
    <tr> 
      <td><div align="right">รูป :</div></td>
      <td><input name="std_pic" type="file" id="std_pic3"></td>
    </tr>
  </table>
  <p align="center"> 
    <input type="submit" name="Submit" value="แก้ไขข้อมูล">
    &nbsp; 
    <input type="reset" name="Submit2" value="ล้างข้อมูล">
  </p>
</form>
<p align="center">&nbsp;</p>

<p>&nbsp;</p></body>
</html>
<?
include "disconnect.php";
?>