<?php
	include("link/databaseconnection.php");
session_start();



$name=$_POST['name'];
$class=$_POST['class'];
$mobile=$_POST['mobile'];
$reason=$_POST['reason'];
$date=date("Y-m-d");
date_default_timezone_set("asia/kolkata");
$time=date("h:i:sa");
$sel="select * from registration2 where mobile='$mobile'";
$res1=mysqli_query($conn,$res1);
$row=mysqli_fetch_array($res1,MYSQLI_BOTH);
if($row)
{
 $ins="insert into complain(name,class,mobile,reason,date,time) values('$name','$class','$mobile','$reason','$date','$time')";
	$res=mysqli_query($conn,$ins);
	
	
	if($res)
	{
		
		echo"<script>alert('Your Complain Submit Please Wait 24 Hours');window.location.href='adm_process.php';</script>";
	}
	else
	{
	echo"<script>alert('Your Complain is not Submit ');window.location.href='adm_process.php';</script>";
	}
}
else
{
    echo"<script>alert('Your Mobile Number Not Exist in Any Form');window.location.href='adm_process.php';</script>";
}
?>