<?php
include_once "includes/config.php";
include_once "includes/session.php";
include_once "includes/functions.php";



/*-------Checking username and email------*/

	$check_user_email = "SELECT user_id FROM ".$tableprefix."users 
				   		 WHERE user_name = ".GetSQLValueString($_GET['uname'],"text").
						 " AND email = ".GetSQLValueString($_GET['uemail'],"text");
	$result_user_email = mysql_query($check_user_email) or die(mysql_error());					   

	if(mysql_num_rows($result_user_email) > 0)
	{
	
		echo 1;
		
	}
	else
	{


/*--------Checking the username---------*/

		$check_user_name = "SELECT user_id FROM ".$tableprefix."users 
							WHERE user_name = ".GetSQLValueString($_GET['uname'],"text");
		$result_user_name = mysql_query($check_user_name) or die(mysql_error());					   
	
		if(mysql_num_rows($result_user_name) > 0)
		{
		
			echo 2;
			
		}
		else
		{
		
/*--------Checking the email---------*/

			$check_user_email = "SELECT user_id FROM ".$tableprefix."users 
								 WHERE email = ".GetSQLValueString($_GET['uemail'],"text");
			$result_user_email = mysql_query($check_user_email) or die(mysql_error());					   
		
			if(mysql_num_rows($result_user_email) > 0)
			{
			
				echo 3;
				
			}			
		
		
		
		}
		
		
	}	
		
	
?>