<?php
	$login = $_GET['login'];
	$password = $_GET['password'];
	$passwordconfirmation = $_GET['passwordconfirmation'];
	
	require_once ('../../common/scripts/bdd.inc.php');
	require_once ('../../common/scripts/connect.inc.php');
	
	header('Content-Type: text/xml');
	echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';

	echo '<mainnode><node result="';
	if ($password == $passwordconfirmation) {
		
		echo checkLoginAndPassword($dbconn, $login, $password);
		echo '" login="'.$login.'" password="'.$password.'" />';
	}
	else {
		echo 'Mot de passe pas pareil.';
		echo '" login="'.$login.'" password="'.$password.'" />';
	}
	echo '</mainnode>';

?>
