Location: PHPKode > projects > OpenVet > openvet/action/login.php
<?php

	$username = $_POST["username"];
	$passwort = $_POST["password"];

	if ($user->verifypassword ($username, $passwort) == false)
	{

		unset ($uid);
		unset ($username);
		unset ($passwort);
		unset ($_COOKIE["OpenVet"]);
		$tab = "home";
		$page = "login";
		$user->_error = "Wrong username or password.";

	}

	if (!empty ($username) && !empty($passwort))
	{
		$uid = $user->doesexist ($username);
		$user->readfromdb ($uid);
		$encode = base64_encode ($uid.":".$username.":".$passwort);

		if ($_COOKIE["OpenVet"] != $encode)
			setcookie ("OpenVet", $encode, time()+60*60*24*365);

		$_COOKIE["OpenVet"] = $encode;
	}

?>
Return current item: OpenVet