Your IP : 10.1.73.149


Current Path : /home/bolconlineco/public_html/coordinator/ajax/
Upload File :
Current File : /home/bolconlineco/public_html/coordinator/ajax/validation.php

<?php
include('../../includes/connection/func.inc.php');
//validate student id from db, tbl name student
if(isset($_POST['stuId']))
{
	$stuId = $_POST['stuId'];
	if(empty($stuId))
	{
		exit;
	}
	$sql = mysql_query("select count(SId) from student where rollno = '$stuId'");
	$result = mysql_fetch_array($sql);
	if($result['count(SId)'] == 0)
	{
		$str = '<div class="alert alert-success" style="padding: 8px 15px 11px 15px; margin: 0;">
                <strong><span class="glyphicon glyphicon-ok"></span></strong>
                </div>';
	}
	else
	{
		$str = '<div class="alert alert-danger" style="padding: 8px 15px 11px 15px; margin: 0;">
                <strong><span class="glyphicon glyphicon-remove"></span></strong>
                </div>';
	}
	echo $str;
	exit;
	
}
//validate email from db, tbl name student
if(isset($_POST['stuEmail']))
{
	$email = $_POST['stuEmail'];
	if(empty($email))
	{
		exit;
	}
	$sql = mysql_query("select count(SId) from student where email = '$email'");
	$result = mysql_fetch_array($sql);
	if($result['count(SId)'] == 0)
	{
		$str = '<div class="alert alert-success" style="padding: 8px 15px 11px 15px; margin: 0;">
                <strong><span class="glyphicon glyphicon-ok"></span></strong>
                </div>';
	}
	else
	{
		$str = '<div class="alert alert-danger" style="padding: 8px 15px 11px 15px; margin: 0;">
                <strong><span class="glyphicon glyphicon-remove"></span></strong>
                </div>';
	}
	echo $str;
	exit;
	
}