<?php
include_once ("conn.php");

date_default_timezone_set("America/Panama");
session_start();
error_reporting(E_ALL & ~E_NOTICE &~E_WARNING );

$_SESSION['database'] = $_POST['database'];
$_SESSION['suc_id'] = $_POST['suc_id'];
		
$hoynow = getdate();
		
//$SQL_Select="UPDATE ".$_SESSION['database'].".empresas SET club_contrato = club_contrato + 1 WHERE emp_id=1 LIMIT 1";
$SQL_Select="UPDATE ".$_SESSION['database'].".club_sucursales SET contr_corre = contr_corre + 1 WHERE suc_id='".$_SESSION['suc_id']."' LIMIT 1";

if ($connection->query($SQL_Select) === TRUE) 
{
    $msg = array("success" => "true", "detalle" => "OK");
} 
else 
{
	$msg = array("success" => "false", "detalle" => $connection);
	echo "Error: " . $SQL_Insert . "<br>" . $connection->error;
}
@mysqli_close($connection);
?>