<?php

$start_date="2016/06/23";
$startDatedt = strtotime($start_date);
  
$end_date="2028/07/23";
$endDatedt = strtotime($end_date);

$date_from_user=date("Y/m/d");
$usrDatedt = strtotime($date_from_user);
//===========================================================
if( $usrDatedt >= $startDatedt && $usrDatedt <= $endDatedt)
{
   $localhost='localhost';
   
   // $user='root';
   // $password='';
   // $year = date("Y");
   // $database="exchangecurrency1396";
   // $db=new mysqli($localhost,$user,$password,$database);
   // $db->set_charset("utf8");
   
    //switch to other database = == = == = = 
	
	$dabas_file = fopen("../database_name.txt","r");
    $dabaseName = fgets($dabas_file);

	
   $localhost='localhost';
   $user='hrtheratsaddd33_exchange_1401';
   $password='hekmat20324';

   $db=new mysqli($localhost,$user,$password,$dabaseName);
   $db->set_charset("utf8");
   
   // closing database = = = == = = = == = = = == = = = = = 
}
else{
	
	header("location: ../expairDate.php");
	
}


  
?>