<?php

$page_title = "Editar Funcionario";
include_once "header.php";
$matricula = isset($_GET['matricula']) ? $_GET['matricula'] : die('erro na matricula');
$idcargo = isset($_GET['idcargo']) ? $_GET['idcargo'] : die('erro no cargo');
include_once 'config/database.php';
include_once 'funcionario.php';
include_once 'cargo.php';
$database = new Database();
$db = $database->getConnection();
$funcionario = new funcionario($db);
$cargo = new Cargo($db);
$funcionario->matricula = $matricula;
$cargo->idcargo = $idcargo;
$cargo->readOne();
$funcionario->readOne();
?>

<form id='update_form' action='' method='post' border='0' autocomplete="off">
    <table class='table table-bordered table-hover'>
        
        <tr>
            <td>Nome</td>
            <td>
                <input name='nome' type="text" class='form-control' value='<?php 
echo htmlspecialchars($funcionario->nome, ENT_QUOTES);
?>
' required=/>
            </td>
        </tr>