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



$adhar=$_POST['adhar'];
$dob=$_POST['dob'];
$session=$_POST['session'];
$session_new=$_POST['session_new'];
$sel12="select * from registration2 where  session='$session' and adhar='$adhar' and dob='$dob' order by id desc  ";
	$res12=mysqli_query($conn,$sel12);
	
	$row12=mysqli_fetch_array($res12,MYSQLI_BOTH);
	if($row12)
	{
 $sel="select * from registration2 where alot_number!='' and session='$session' and adhar='$adhar' and dob='$dob' order by id desc  ";
	$res=mysqli_query($conn,$sel);
	
	$row=mysqli_fetch_array($res,MYSQLI_BOTH);
	$id=$row['id'];
	$class=$row['class'];
	if($class=='BA I' or $class=='B.Sc I' or $class=='MA I' or $class=='M.Sc I' )
	{
	
	
	if( $row)
	{
		$_SESSION['roll']=$roll_no;
		echo"<script>alert('Data Verify ');window.location.href='login_success_student_adm.php?flag=$id&&flag2=$session_new&&flag3=$adhar';</script>";
		//echo"<script>alert('Roll Number Verify ');window.location.href='registration_check.php';</script>";
	}
	else
	{
	echo"<script>alert('Aadhaar or DOB  Incorrect');window.location.href='check_student.php';</script>";
	}
	}

	
	
	/////////////
		if( $class=='B.Sc II' or $class=='BA II' )
	{
	
	$sel124="select * from registration2 where  session='$session' and id='$id' order by id desc  ";
	$res124=mysqli_query($conn,$sel124);
	
	$row124=mysqli_fetch_array($res124,MYSQLI_BOTH);
	
	if( $row and $row124)
	{
		$_SESSION['roll']=$roll_no;
		echo"<script>alert('Data Verify ');window.location.href='login_success_student_adm.php?flag=$id&&flag2=$session_new&&flag3=$adhar';</script>";
		//echo"<script>alert('Roll Number Verify ');window.location.href='registration_check.php';</script>";
	}
	else
	{
	echo"<script>alert('Aadhaar or DOB  Incorrect ');window.location.href='check_student.php';</script>";
	}
	
	}
	
	}
	else
	{
		 echo"<script>alert('Login Not Active Wait 24 Hours');window.location.href='check_student.php';</script>";
	
	}
?>