<?php
session_start();
// ============
include("../../asset/theme/css/myfunc.php");
include("../../php_crud/my_class_for_web.php");
$obj=new my_class();
// ============
$operation=isset($_POST['operation'])?$_POST['operation']:'';

if($operation=='update'){
	extract($_POST);
	
	$form_data=array(
			'_exam_name'=>$exam_name,
			'_roll'=>$roll,
			 '_board_id'=>$education_board,
			'_pass_year'=>$pass_year,
			'_institute_name'=>$_gpa,
			'_gpa'=>$_gpa
			
			
	);
	$entry1=$obj->Update_Data('_students_admission_academic_info', $form_data, '_id='.$academic_info_id);
	if($entry1){
		echo 'Successfully Updated';
	}else echo 'Failed to update';
}else if($operation=='insert'){
		extract($_POST);
		$form_data=array(
			'_exam_name'=>$exam_name,
			'admission_id'=>$admission_id,
			'_roll'=>$roll,
			 '_board_id'=>$education_board,
			'_pass_year'=>$pass_year,
			'_institute_name'=>$_gpa,
			'_gpa'=>$_gpa
			
			
		);
		$entry1=$obj->Insert_Data('_students_admission_academic_info', $form_data);
		if($entry1){
			echo 'Successfully Inserted';
		}else echo 'Failed to insert';
	}