Location: PHPKode > projects > phprofession job board > phProfession_SA/authenticate.php
<?php
#####################################
#   phprofession   June   2002      #
#   by Aidan Peiser	    	    #
#   Recruitment module for PN.714   #
#   www.galore.co.za	    #
#	.,.,.,,			    #
#	C 'C' C			    #
#	 > * <			    #
#####################################
//goes to this file after you login to check if you are a valid user
include("config.php");
include("functions.php");

if ($logout == "true")
{
	kill_session($hostname);
	redirect($login_success);
}
else
{
	$link = mysql_connect($hostname, $user, $pass) or die("Could not connect");
	mysql_select_db($database) or die("Could not select database");
		$result = mysql_query("SELECT * FROM {$prefix}_jobaccounts WHERE user='$UserName'");
 		$row_array = mysql_fetch_array($result);
		if ($row_array[0] == "")
		{
			redirect("$redirect_error&error=7");
		}
		else
		{
			$Password = substr(md5("phpcryptcamp".$Password),0,10);
			if ($Password != $row_array[1])
			{
				redirect("$redirect_error&error=8");
			}
			else
			{
				init_session($row_array[3]);
				mysql_query("UPDATE {$prefix}_jobaccounts SET count=count+1 WHERE {$prefix}_jobaccounts.user = '$UserName'");
				redirect($login_success);
			}
		}
}

?>			
Return current item: phprofession job board