<?
require('include/configure.php');
require('include/database.php');

db_connect() or die('Unable to connect to database server!');

$sql = "SELECT * from user WHERE u_username='$id' and u_pwd='".md5($pwd)."'";
$result =mysql_query($sql)or die(mysql_error());
if(mysql_num_rows($result)==0)echo "ISFALSE";
else{
	while($myrow=MySQL_fetch_array($result))
	{
		$_SESSION["egoUser"]=$myrow["u_username"];
		if($myrow["u_level"]=="A")$_SESSION["egoLevel"]="Admin";
		else $_SESSION["egoLevel"]="Member";
		echo "TRUE";
	}
	
}
?>