function getPersona($id_persona) { $con = new Database(); $con->Query("select nombre,paterno,materno,curp,fecha_nacimiento from personas where id_persona=" . $id_persona); $nombe = ""; $paterno = ""; $materno = ""; $curp = ""; $fecha = ""; while ($fila = $con->nextRow()) { $fecha = strtotime($fila['fecha_nacimiento']); $paterno = $fila['paterno']; $materno = $fila['materno']; $nombre = $fila['nombre']; $curp = $fila['curp']; $fecha = date('d-m-Y', $fecha); } $array = array("nombre" => $nombre, "paterno" => $paterno, "materno" => $materno, "curp" => $curp, "fecha" => $fecha); return $array; }
<?php session_start(); if (empty($_SESSION["sqPLD"])) { header("Location: ../"); } include_once "../model/mConexion.php"; $con = new Database(); $con->Query("select nombre,paterno,materno from personas where id_persona=" . $_GET['id']); $persona = ""; while ($fila = $con->nextRow()) { $persona = $fila['paterno'] . " " . $fila['materno'] . " " . $fila['nombre']; } ?> <!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html;charset=UTF-8" /> <meta charset="utf-8" /> <title>Sistema de Cartera - PLD | Emprever</title> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <meta content="" name="description" /> <meta content="" name="author" /> <!-- BEGIN PLUGIN CSS --> <link href="../assets/plugins/pace/pace-theme-flash.css" rel="stylesheet" type="text/css" /> <link href="../assets/plugins/jquery-datatable/css/jquery.dataTables.css" rel="stylesheet" type="text/css" /> <link href="../assets/plugins/datatables-responsive/css/datatables.responsive.css" rel="stylesheet" type="text/css" /> <!-- END PLUGIN CSS --> <!-- BEGIN CORE CSS FRAMEWORK --> <link href="../assets/plugins/pace/pace-theme-flash.css" rel="stylesheet" type="text/css" media="screen"/> <link href="../assets/plugins/bootstrap-select2/select2.css" rel="stylesheet" type="text/css" media="screen"/>