<?php

//$file = fopen("log.txt", "w");   /// BORRAR LOG
//fwrite($file, "Error $error". PHP_EOL);
//fclose($file);

$zona=$_GET["zona"];
$ras=$_GET["ras"];
$config = require ('config.php');
$conexion=$config['conexion'];

$conn = pg_connect($conexion);

$sql="update zonas set seleccion='-'";
$result = pg_query($conn,$sql);
$sql="update zonas set seleccion='S' where zona='$zona' and ras='$ras'";
$result = pg_query($conn,$sql);

pg_close($conn);	
echo 'OK';

?>