I have a problem with a form to edit employees, I have a comboBox where I display the posts that exist in a select, but I can not get in this form to edit I selected the option that has the record is only printed as it would be by default. I append my code, I hope you can help me.
<?php
require_once("TipoEmpleado.php");
require_once("Empleado.php");
$elId=$_GET['id'];
$empleado = new Empleado();
$tipoEmpleado = new TipoEmpleado();
$listaTipo = $tipoEmpleado->mostrarTodos();
$imprimir=$empleado->mostrar($elId);
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Editar empleado</title>
<link rel="stylesheet" href="css/bootstrap.css"/>
<link rel="stylesheet" href="css/main.css"/>
</head>
<body>
<div>
<form action="GuardarEditarTipoEmpleado.php" method="POST">
<?php foreach($imprimir as $emple){
?>
<div class="container">
<input name="txtId" type="hidden" value="<?php echo $elId; ?>" />
<label>Nombre</label>
<input type="text" name="txtNombre" required class="form-control" id="txtNombre" value="<?php echo $emple->NomEmpleado; ?>" /><br/>
<label>Nombre de usuario</label>
<input type="text" name="txtNombreUsuario" required class="form-control" id="txtNombreUsuario" value="<?php echo $emple->NombreUsuario; ?>" /><br/>
<label>Contraseña</label>
<input type="text" name="txtContrasena" required class="form-control" id="txtContrasena" value="<?php echo $emple->Contrasena; ?>" /><br/>
<label>Correo Electronico</label>
<input type="text" name="txtCorreo" required class="form-control" id="txtCorreo" value="<?php echo $emple->Correo; ?>" /><br/>
<label>Puesto</label>
<select name="txtTipo" id="txtTipo">
<?php
foreach($listaTipo as $tipo){
?>
<option><?php echo $tipo->NomTipoEmp; ?></option>
<?php
}
?>
</select>
<button type="btn-guardar" class="btn btn-success">Agregar</button>
<a class="btn btn-danger" href="">Regresar</a>
</div>
<?php
}
?>
</form>
</div>
</body>
</html>