  | 
                       | 
          
            
               
                 <?php 
include "dbconnect.php"; 
$std_id=$_REQUEST["id"]; 
$std_pass=$_POST["std_pass"]; 
$std_prefix=$_POST["std_prefix"]; 
$std_name=$_POST["std_name"]; 
$std_address=$_POST["std_address"]; 
$std_phone=$_POST["std_phone"]; 
$std_branch=$_POST["std_branch"]; 
$std_gruop=$_POST["std_gruop"]; 
$graduatedfrom=$_POST["graduatedfrom"]; 
$province=$_POST["province"]; 
$education=$_POST["education"]; 
$score=$_POST["score"]; 
$course=$_POST["course"]; 
$degree=$_POST["degree"]; 
$year=$_POST["year"]; 
$gpa=$_POST["gpa"]; 
$father_name=$_POST["father_name"]; 
$mother_name=$_POST["mother_name"]; 
$father_career=$_POST["father_career"]; 
$mother_career=$_POST["mother_career"]; 
$tel_number=$_POST["tel_number"]; 
$std_status=$_POST["std_status"]; 
 
 
if($_POST["std_pass"] != $_POST["conpassword"]) 
  { 
    echo "Password not Match!"; 
    exit(); 
  } 
 
$sql = "update tb_student set std_id='$std_id' 
, std_pass='$std_pass' 
, std_prefix='$std_prefix' 
, std_name='$std_name'  
, std_address='$std_address'  
, std_phone='$std_phone'  
, std_branch='$std_branch'  
, std_gruop='$std_gruop' 
, graduatedfrom='$graduatedfrom'  
, province='$province'   
, education='$education' 
, score='$score' 
, course='$course' 
, degree='$degree' 
, year='$year' 
, gpa='$gpa' 
, father_name='$father_name' 
, mother_name='$mother_name' 
, father_career='$father_career' 
, mother_career='$mother_career' 
, tel_number='$tel_number' 
, std_status='$std_status' 
 
where std_id='$std_id'"; 
mysqli_query($conn,$sql); //สั่ง sql ให้ทำงาน 
mysqli_close($conn);  //สั่ง sql ปิดการทำงาน 
echo "<script>alert('แก้ไขข้อมูลเรียบร้อยแล้ว');</script>"; 
?> 
<SCRIPT language="JavaScript"> //เมื่อบันทึกแล้วก็จะกลับมาหน้าเดิมใหม่ 
window.location="student.php"; 
</SCRIPT>                        
               
               | 
             
            
              
			                              
                              
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2018-04-03 00:13:16 | 
                        By :
                            นิติรุจน์ | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             |