Good morning, I'm doing a CRUD, and right now I'm making a table where I can select modify or insert users, well I come to the conclusion, that when I pass the table to users they choose for example which user they want to select, but they can only select the acronym, but of course I would like them to select the acronym of their names but that next or superimposed you can see which name and surnames correspond to that acronym.
This is the code that I have to select the acronyms right now, I just need to print next or superimposed the name plus last names that are in the same table as the acronym.
<td>
<select id="acro_usuario1" name="acro_usuario1">
<option value="<?php echo isset($obj_categoria) ? $obj_categoria->__GET('acro_usuario') : ''; ?>"><?php echo isset($obj_categoria) ? $obj_categoria->__GET('acro_usuario') : ''; ?> </option>
<?php
$pdo = new PDO('mysql:host=localhost;dbname=deimos1', 'root', '');
$pdo->setAttribute(PDO::MYSQL_ATTR_INIT_COMMAND, "SET NAMES 'utf8'");
$stmt = $pdo->prepare('Select acro_usuario from usuarios');
$stmt->execute();
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
echo '<option>' . $row['acro_usuario'] . '</option>';
}
?>
</select>
</td>