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


session_start();

 $id=$_POST['mobile'];
 $class=$_POST['class'];
  $session=$_POST['session'];
   $adhar=$_POST['adhar'];

	
	$sel2="select * from registration2 where id='$id' and class='$class' and adhar='$adhar' and session='$session'  ";
	$res2=mysqli_query($conn,$sel2);
	
	$row2=mysqli_fetch_array($res2,MYSQLI_BOTH);
	$class=$row2['class'];
	 $application=$row2['application'];
		$mobile=$row2['mobile'];
	$form_id=$row2['id'];
if($class=='BA I' or $class=='B.Sc I' or $class=='M.Sc I' or $class=='MA I')
	{
	    //	echo $application=$row2['application'];
	if($row2)
	{
	     

		echo"<script>alert('Login Succesfully ');window.location.href='login_success_student_2023.php?flag=$application&& flag2=$session';</script>";
    	
	}
	else
	{
	echo"<script>alert('Invailid . ');window.location.href='login_2023.php';</script>";
	}
	}
	else
	{
	    	echo"<script>alert('Only BA I , B.Sc I, MA I,M.Sc I Open  or Login Invailid . ');window.location.href='login_2023.php';</script>";
	}
?>