If anyone has an answer, I will thank them very much. I want to get the value of the selected record to show it in the same form from where I select the record.
This is my code:
<tr>
<td scope="row" align="right">Nombre de Carrera: </td>
<td> <select name="carrera" onchange="">
<option value="" selected>Selecciona una carrera</option>
<?php
$res=mysql_query($query);
while($row=mysql_fetch_array($res))
{
?>
<option value="<?php echo $row['idcarrera'];?>'" selected="true"><?=$row['nombrecarrera']?></option>
<?php } $idcarrera=$row['idcarrera']?>
</select></td>
</td>
</tr>