<?php session_start(); /* login php */ ?>
	
<?php 	include('../config/config.php');
	
	$username =  $_POST['username'];
	$password =  $_POST['password'];
	
	$log = mysql_query("SELECT * FROM admin WHERE username = '$username'") or die(mysql_error());
	
	$in = mysql_fetch_array($log);
	
	if( $in['password'] == md5($password)) {
	
	$_SESSION['admin_id'] = $in['id'];
	
	echo 1;
	
	}else{
	
	echo 0;

	}
	

 ?>

