<?php

	session_start();
	include('database.php');
	DB_connexion(); 
	
	$login = $_SESSION['login']; 
	$sql = "SELECT * FROM membres WHERE login = '".$login."' ";
 	$requete = mysql_query($sql);
	$result = mysql_fetch_assoc($requete);
		
	$email = $result['email'];
	
	// email inchangé
	if($email == $_GET["email"])
	{ 	echo "1";
	}
	
	// email différent
	if($email != $_GET["email"])
	{
			$result = mysql_query("SELECT email FROM membres WHERE email ='".$_GET["email"]."'");
			
			if(mysql_num_rows($result)>=1)
				echo "2";
			else
				echo "3";
	}		

?>