Initial Commit
This commit is contained in:
17
action/action_facultades_update.php
Normal file
17
action/action_facultades_update.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
$ruta = "../";
|
||||
require_once "../class/c_login.php";
|
||||
|
||||
// check if the session is started
|
||||
if (!isset($_SESSION['user']))
|
||||
die(json_encode(['error' => 'No se ha iniciado sesión']));
|
||||
|
||||
$user = unserialize($_SESSION['user']);
|
||||
$ruta = "../";
|
||||
require_once "../include/bd_pdo.php";
|
||||
global $pdo;
|
||||
$sql = "SELECT fu_updatefacultad(:nombre, :activa, :id)";
|
||||
$params = [':nombre' => mb_strtoupper($_POST['nombre']), ':activa' => $_POST['estado'], ':id' => $_POST['id']];
|
||||
query($sql, $params, false);
|
||||
header("Location: ../facultades.php");
|
||||
exit();
|
||||
Reference in New Issue
Block a user