<?php 
session_start();
include('dbconnection.php');
if(isset($_POST['login']))
{
$password=$_POST['dp_userPassword'];
$dec_password=$password;
$ret=mysqli_query($con,"SELECT * FROM dp_users WHERE dp_userEmail='".$_POST['dp_userEmail']."' and dp_userPassword='$dec_password'");
$num=mysqli_fetch_array($ret);
if($num>0)
{
	
$extra="crmindex.php";
$_SESSION['login']=$_POST['dp_userEmail'];
$_SESSION['dp_userID']=$num['dp_userID'];
$_SESSION['dp_userName']=$num['dp_userName'];
$_SESSION['dp_userCurrent']=$num['dp_userCurrent'];
$host=$_SERVER['HTTP_HOST'];
$uri=rtrim(dirname($_SERVER['PHP_SELF']),'/\\');
header("location:http://$host$uri/$extra");
exit();
}
else
	
{
$_SESSION['action1']="Mail veya Şifre Geçersiz !";
$extra="index.php";
$host=$_SERVER['HTTP_HOST'];
$uri=rtrim(dirname($_SERVER['PHP_SELF']),'/\\');
header("location:http://$host$uri/$extra");
exit();
}
}


?>
{
	