  <?php
 session_start(); 
	if(isset($_POST["submit"]))
	{
		
		include 'includes/database.php';
	
		$sql = "SELECT * FROM user
			WHERE email = '".$_POST ['Name']."' AND password = '".$_POST ['password']."' ";

		$result = $newcon-> query($sql)	;

		if(@mysqli_num_rows($result) > 0)
		{
		$_SESSION['pengguna'] = $_POST['Name'];


		header("Location: donorprofile.php");

		
	}
		else
		{
			header("Location: 404.php");
		}

		
		$newcon->close();
	}


 ?>