query("INSERT INTO `assignment` (file, description) VALUE ('$fileName', '".$_POST['description']."')"); echo ''; } else{ echo ''; } } if ($_GET['action'] == 'delete') { $id = $_GET['id']; $con->query("Delete from `assignment` WHERE id = '$id'"); echo ''; } // if($_POST['status']=='study_material') // { // $img = photo_upload('image','study_material'); // if($img['status']){ // $image = $img['file_name']; // }else{ // $image= $img['error']; // } // print_r($img); // // echo $image; // // exit; // $con->query("INSERT INTO `study_material` (file,description) VALUE ('".$_POST['image']."','".$_POST['description']."')"); // echo ''; // // $con->query("INSERT INTO `students` (`dur_start`,`dur_ends`,`id`, `timestamp`, `enrollment_no`, `name`, `gender`, `father`, `mother`, `dob`, `mobile`, `email`,`address`, `state`, `distric`, `exam_pass`, `marks`, `board`, `year`, `username`, `password`, `course_id`, `center_id`, `photo`, `transection_id`, `status`) VALUES ('".$_POST['dur_start']."','".$_POST['dur_ends']."',NULL, CURRENT_TIMESTAMP, '".$_POST['enrollment_no']."', '".$_POST['name']."', '".$_POST['gender']."', '".$_POST['father']."', '".$_POST['mother']."', '".$_POST['dob']."', '".$_POST['mobile']."', '".$_POST['email']."', '".$_POST['address']."','".$_POST['state']."', '".$_POST['distric']."', '".$_POST['exam_pass']."', '".$_POST['marks']."', '".$_POST['board']."', '".$_POST['year']."', '".$_POST['username']."', '".$_POST['password']."', '".$_POST['course_id']."', '".$_POST['center_id']."', '".$image."', '', '0')"); // // $id = mysqli_insert_id($con); // // echo ''; // // } // } ?>