<?php
if(isset($_POST['id'])){
  require_once('../../assets/config/config.php');
  $obj=new Database();
  $s_id=$_POST['id'];;
  $id="student_id='".$s_id."'";
  $name=$_POST['name'];
  $fname=$_POST['fname'];
  $mobile=$_POST['mobile'];
  $o_mobile=$_POST['o_mobile'];
  $dob=$_POST['dob'];
  $email=$_POST['email'];
  $address=$_POST['address'];
  $state=$obj->update('students',['name'=>$name,'father_name'=>$fname,'dob'=>$dob,'address'=>$address,'email'=>$email,'o_contact_no'=>$o_mobile,'mobile_no'=>$mobile],$id);
  if($state==1)
      {
        echo 1;
      }
      else
      {
        echo 0;
      }
}
?>