<?php
	include 'connection.php';
	error_reporting(0);
	$number=rand(1111,9999);
	$random="DGRC/RAN/";
	$grievance_id=$random.$number;
	$phone=$_POST['t1'];
	$altphone=$_POST['t4'];
	$fname=ucwords($_POST['ta2']);
	$mname=ucwords($_POST['tb2']);
	$lname=ucwords($_POST['tc2']);
	$gname=ucwords($_POST['t3']);
	$email=$_POST['t5'];
	$gender=$_POST['t6'];
	$aadhar=$_POST['t7'];
	$area=$_POST['t10'];
	$dist=$_POST['t8'];
	$occupation=$_POST['t9'];
	$muncipiltiy=$_POST['t11'];
	$block=$_POST['t12'];
	$panchayat=$_POST['t13'];
	$vill=$_POST['vill'];
	$ward=$_POST['t15'];
	$landmark=$_POST['t16'];
	$ps=$_POST['t17'];
	$vs=$_POST['t18'];
	$ls=$_POST['t19'];
	$desc=$_POST['t22'];

	$query="INSERT INTO grievence_from(grievance_id,mobile,alternate_mobile,first_name,middle_name,last_name,guardian_name,email,gender,aadhar,district,occupation,area,muncipility,block,panchayat,village,ward,landmark,police_station,vidhan_sabha,lok_sabha,description,reg_date) 
	VALUES('$grievance_id','$phone','$altphone','$fname','$mname','$lname','$gname','$email','$gender','$aadhar','$dist','$occupation','$area','$muncipiltiy','$block','$panchayat','$vill','$ward','$landmark','$ps','$vs','$ls','$desc','$date')";
	if (mysqli_query($con,$query)) {
		echo "Data Insert";
	}
	else{
		echo "something wrong";
	}

?>