<?php
include "../../root.class.php";
$db = new db_safeguard();

$date = date("Y-m-d H:i", strtotime("+2 Hours"));
var_dump($_POST);

$dnis_id = $db->query("dnis_inspection", "INSERT INTO `dnis_inspection`( `receiving_batch_no`, `date`, `mechanical_damage`, `half_nut`, `open_micropyle`, `sting_bug`, `cracked`, `pale_shell`, `mis_shaped`, `dark_shell`, `germination`, `nut_borer`, `calcuim_def`, `other`, `other_comment`, `nih_quantity`) VALUES ('{$_POST['receiving_batch_no']}' ,'{$date}', '{$_POST['mechanical_damage']}', '{$_POST['half_nut']}', '{$_POST['open_micropyle']}', '{$_POST['sting_bug']}','{$_POST['cracked']}','{$_POST['pale_shell']}','{$_POST['mis_shaped']}','{$_POST['dark_shell']}','{$_POST['germination']}','{$_POST['nut_borer']}','{$_POST['calcuim_def']}','{$_POST['other']}','{$_POST['other_comment']}', '{$_POST['nih_quantity']}')");

$nut_progess = $db->query("nut_analysis_report","UPDATE `nut_analysis_report` SET `status` = 'KERNAL INSPECTION' WHERE `receiving_batch_no` = '{$_POST['receiving_batch_no']}'");

echo "
<script>
window.location.href = 'kernal_analysis.php';
</script>
";