Initial Commit
This commit is contained in:
23
action/action_profesores_update.php
Normal file
23
action/action_profesores_update.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
$ruta = "../";
|
||||
|
||||
/* ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
error_reporting(E_ALL); */
|
||||
require_once "../include/bd_pdo.php";
|
||||
global $db;
|
||||
$grado = $_POST['grado'];
|
||||
$grado = mb_strtoupper($grado);
|
||||
if (!empty($grado)) {
|
||||
if (!ctype_space($grado)) {
|
||||
if ($grado[strlen($grado) - 1] != '.')
|
||||
$grado .= '.';
|
||||
} else {
|
||||
$grado = "";
|
||||
}
|
||||
}
|
||||
// print_r($_POST);
|
||||
|
||||
$db->where('profesor_id', $_POST['id'])->update('profesor', ['profesor_grado' => $_POST['grado']]);
|
||||
header("Location: ../profesores.php", true, 307);
|
||||
exit();
|
||||
Reference in New Issue
Block a user