Location: PHPKode > scripts > RanTex-Random text Script > admin/login_chk.php
<?
/**
*
* @Script Random Text
* @version 1.0.0
* @copyright (c) Agrizlive.com
* @license You are allowed to modify this script. But you must provide a link of agrizlive.com in your footer (bottom of the page)
*
* Tested : PHP 5.2.11
*/

/**
*/

ob_start();
session_start();
	include_once("text_config.php");
	$username = addslashes($_POST['username']);
	$password = addslashes(md5($_POST['password']));
	
	
	$query = "SELECT * FROM agriz_admin_text WHERE user_name = '$username' AND password = '$password'";
	$result = mysql_query($query);
	
	if(mysql_num_rows($result) == 1)
	{
		$_SESSION['agriz_text_user'] = $username;
		header("location: index.php");
	}
	else
	{
		header("location: login.php?err=Failed");
	}
?>
Return current item: RanTex-Random text Script