модель класса persona
{
private $ conex;
function __construct()
{
$this->conex = new conexion();
}
public function registrarpersona ()
{
try {
$sql = "INSERT INTO expediente (cedula, nombre, apellido, telefono, descripcion, direccion, fecha_nac, sexo, id_parroquia) VALUES (?,?,?,?,?,?,?,?,?)";
$obj = $this->conex->prepare($sql);
$obj->bindValue(1,$_POST['cedula'], PDO::PARAM_STR);
$obj->bindValue(2,$_POST['nombre'], PDO::PARAM_STR);
$obj->bindValue(3,$_POST['apellido'], PDO::PARAM_STR);
$obj->bindValue(4,$_POST['telefono'], PDO::PARAM_STR);
$obj->bindValue(5,$_POST['descripcion'], PDO::PARAM_STR);
$obj->bindValue(6,$_POST['direccion'], PDO::PARAM_STR);
$obj->bindValue(7,$_POST['fecha_nac'], PDO::PARAM_STR);
$obj->bindValue(8,$_POST['sexo'], PDO::PARAM_STR);
$obj->bindValue(9,$_POST['id_parroquia'], PDO::PARAM_STR);
$obj->execute();
} catch (Exception $e) {
echo "Error Al Registrar Expediente: " .$e->getMessage();
}