<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type" /> <title>Administracion de Empresas</title> <link href="../css/administracion.css" rel="stylesheet" type="text/css" /> </head> <?php if (isset($_POST['guardar'])) { $a[1] = null; $a[1] = $_POST['nombre']; $a[2] = $_POST['sigla']; $a[3] = $_POST['pais']; include_once '../controller/class_region.php'; $empresa = new region(); if ($empresa->addRegion($a)) { echo "<script>alert('Se han registrado correctamente los datos de la Region')</script>"; } else { echo "<script>alert('Se ha generado un problema al registrar los datos de la Region')</script>"; } } if (isset($_POST['modificar'])) { $id = $_POST['id']; $a[1] = $_POST['nombre']; $a[2] = $_POST['sigla']; $a[3] = $_POST['pais']; include_once '../controller/class_region.php'; $empresa = new region(); if ($empresa->updateRegion($id, $a)) { echo "<script>alert('Se ha modificado correctamente los datos solicitados')</script>"; echo "<script>window.open('regiones.php','_self')</script>";