<?php include_once './cad/DAL/Connection.php'; include_once './cad/BLL/ClasePersonaBLL.php'; include_once './cad/DTO/ClasePersona.php'; $id = $_REQUEST["id"]; $personaBLL = new PersonaBLL(); $objPersona = $personaBLL->select($id); ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body> </body> </html>
<?php include_once './cad/DAL/Connection.php'; include_once './cad/BLL/ClasePersonaBLL.php'; include_once './cad/DTO/ClasePersona.php'; $personaBLL = new PersonaBLL(); if (isset($_REQUEST["task"])) { $task = $_REQUEST["task"]; } else { $task = "mostrar"; } switch ($task) { case "insertar": if (isset($_REQUEST["nombres"])) { $nombres = $_REQUEST["nombres"]; } if (isset($_REQUEST["apellidos"])) { $apellidos = $_REQUEST["apellidos"]; } if (isset($_REQUEST["edad"])) { $edad = $_REQUEST["edad"]; } $id = $personaBLL->insert($nombres, $apellidos, $edad); $objPersona = $personaBLL->select($id); echo json_encode($objPersona); break; case "seleccionar": if (isset($_REQUEST["id"])) { $id = $_REQUEST["id"]; } $objPersona = $personaBLL->select($id);
<?php include_once './cad/DAL/Connection.php'; include_once './cad/BLL/ClasePersonaBLL.php'; include_once './cad/DTO/ClasePersona.php'; $personaBLL = new PersonaBLL(); if (isset($_REQUEST["task"])) { $task = $_REQUEST["task"]; } else { $task = "mostrar"; } switch ($task) { case "insertar": if (isset($_REQUEST["nombres"])) { $nombres = $_REQUEST["nombres"]; } if (isset($_REQUEST["apellidos"])) { $apellidos = $_REQUEST["apellidos"]; } if (isset($_REQUEST["edad"])) { $edad = $_REQUEST["edad"]; } $personaBLL->insert($nombres, $apellidos, $edad); break; case "actualizar": if (isset($_REQUEST["nombres"])) { $nombres = $_REQUEST["nombres"]; } if (isset($_REQUEST["apellidos"])) { $apellidos = $_REQUEST["apellidos"]; }
<?php include_once './cad/DAL/Connection.php'; include_once './cad/BLL/ClasePersonaBLL.php'; include_once './cad/DTO/ClasePersona.php'; $personaBLL = new PersonaBLL(); ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <script src="script.js" type="text/javascript"></script> <title></title> </head> <body> <a href="javascript:mostrarFormularioInsercionPersona()">Crear Persona</a> <table id="tblDatos"> <thead> <tr> <th> ID </th> <th> Nombres </th> <th> Apellidos </th> <th> Edad </th>