$foreclosure = 0;
$landlord = 0;
$years = 0;
$months = 0;
$bankstatements = 0;
$bank_average = 0;
$nfs_average = 0;
$creditcard = 0;
$creditcard_t = '';
$creditcard_average = '';
$email = '';
$tutorial = '';
// if (in_array($element, $tutorial)){echo "";}
//Objects
$business = new Business();
$lender = new Lender();
if (isset($_POST['id_lender']) && !is_numeric($_POST['id_lender'])) {
    foreach ($_POST['business'] as $names) {
        $string_business = $string_business . ', ' . $names;
    }
    $lender->setName($_POST['name']);
    $lender->setBusiness($string_business);
    $lender->setForeclosure($_POST['foreclosure']);
    $lender->setLandlord($_POST['landlord']);
    $lender->setYears($_POST['years']);
    $lender->setMonths($_POST['months']);
    $lender->setBankStatements($_POST['bankstatements']);
    $lender->setBankAverage($_POST['bank_average']);
    $lender->setNSF($_POST['nsf']);
    $lender->setCreditCard($_POST['creditcard']);
    $lender->setCreditCard_t($_POST['creditcard_t']);
$landlord = 0;
$years = 0;
$months = 0;
$total_months = 0;
$bankstatements = 0;
$bank_average = 0;
$nfs_average = 0;
$creditcard = 0;
$creditcard_t = '';
$creditcard_average = '';
$email = '';
$emails = '';
$tutorial = '';
//Objects
$filter = new Filter();
$lender = new Lender();
$business = new Business();
$merchant = new Merchant();
$emailobj = new Email();
if (isset($_GET['id_merchant'])) {
    $id_merchant = $_GET['id_merchant'];
    $merchant->Merchant($id_merchant);
    $filter->Filter($_GET['id_merchant']);
    $type_business = $filter->getBusiness();
    $foreclosure = $filter->getForeclosure();
    $landlord = $filter->getLandlord();
    $years = $filter->getYears();
    $months = $filter->getMonths();
    $total_months = $filter->getTotalMonths();
    $bankstatements = $filter->getBankStatements();
    $bank_average = $filter->getBankAverage();
//Classes
include_once 'Classes/Merchant.php';
include_once 'Classes/Filter.php';
include_once 'Classes/Email.php';
include_once 'Classes/Lender.php';
// Variables
$id_lender = 0;
$id_email = '';
$name = '';
$email = '';
//Objects
$merchant = new Merchant();
$filter = new Filter();
$emailobj = new Email();
$lender = new Lender();
if (isset($_GET['id_lender'])) {
    $id_lender = $_GET['id_lender'];
    $emailobj->setIDLender($id_lender);
}
if (isset($_POST['id_email']) && !is_numeric($_POST['id_email'])) {
    $emailobj->setIDLender($_POST['id_lender']);
    $emailobj->setName($_POST['name']);
    $emailobj->setEmail($_POST['email']);
    $emailobj->insertEmail();
}
if (isset($_GET['edit'])) {
    $id_email = $_GET['edit'];
    $emailobj->Email($_GET['edit']);
    $name = $emailobj->getName();
    $email = $emailobj->getEmail();