Ver Mensaje Individual
  #6 (permalink)  
Antiguo 27/05/2014, 10:51
portal47
 
Fecha de Ingreso: abril-2014
Mensajes: 141
Antigüedad: 10 años
Puntos: 1
Respuesta: problema con combobox

perdon por la tardanza, por desgracia es una tabla, no me dejan hacer grandes cambios en esa pagina tan fea

aqui esta el codigo:

Código PHP:
                    <form name='actualiza' method='post' action='ejecuta.php'>
        <table class="tabla2">
        <tr>
        <h3>Formulario de Modificación</h3><br>
        </tr>
        <tr>
        <td><input size="70" name='id_persona'  type='hidden' maxlength='90' value="<?php echo $cl?>"></td>
      </tr>
      <tr>
        <td><input size="70" name='id_titulo'  type='hidden' maxlength='90' value="<?php echo $id_titulo?>"></td>
        </tr>
<td height="44">
      
<?php 
      $result 
mysql_query("SELECT * FROM dir_titulo ORDER BY titulo ASC");
?>
      Titulo:
      
<select name="titulo" style="width: 300px;"> 
<?php
while($row mysql_fetch_array($result)) {

$valor $row["id_titulo"] ;
$nom $row["titulo"];
$valor_actual $row["id_titulo"] ;
$sel = ($valor_actual == $row["id_titulo"]) ? ' selected="selected"' '';
echo 
"<option ".$sel." value=".$valor." >".$nom."</option>";

?>
</select>

</td>
      </tr>
      <tr>
        <td height="44"> Nombre:</td>
        <td><input size="70" name='nombre'  type='text' maxlength='90' value="<?php echo $nombre?>"></td>
      </tr>
      <tr>
        <td height="44">Paterno:</td>
        <td><input size="70" name='paterno'  type='text' maxlength='90' value="<?php echo $paterno?>"></td>
      </tr>
      <tr>
        <td height="44">Materno:</td>
        <td><input size="70" name='materno'  type='text' maxlength='90' value="<?php echo $materno?>"></td>
      </tr>
      <tr>
        <td><input size="70" name='id_puesto'  type='hidden' maxlength='90' value="<?php echo $id_puesto?>"></td>
      </tr>
      
      <td height="44">
      
<?php 
      $result 
mysql_query("SELECT * FROM dir_puesto ORDER BY puesto ASC");
?>
      Puesto:
      
<select name="puesto" style="width: 300px;"> 
<?php
while($row mysql_fetch_array($result)) {

$valor $row["id_puesto"] ;
$nom $row["puesto"];
echo 
"<option  value=".$valor.">".$nom."</option>";

?>
</select>

</td>

      
      <tr>        
        <td><input size="70" name='id_adscripcion'  type='hidden' maxlength='90' value="<?php echo $id_adscripcion?>"></td>
      </tr>
      
      <td height="44">
      
<?php 
      $result 
mysql_query("SELECT * FROM dir_adscripcion ORDER BY adscripcion ASC");
?>
      Adscripcion:
      
<select name="adscripcion" style="width: 300px;"> 
<?php
while($row mysql_fetch_array($result)) {

$valor $row["id_adscripcion"] ;
$nom $row["adscripcion"];
echo 
"<option selected=".$nom." value=".$valor.">".$nom."</option>";

?>
</select>

</td>
      <tr>
        <td><input size="70" name='id_domicilio'  type='hidden' maxlength='90' value="<?php echo $id_domicilio?>"></td>
      </tr>
            <td height="44">
      
<?php 
      $result 
mysql_query("SELECT * FROM dir_domicilio ORDER BY domicilio ASC");
?>
      Domicilio:
      
<select name="domicilio" style="width: 300px;"> 
<?php
while($row mysql_fetch_array($result)) {

$valor $row["id_domicilio"] ;
$nom $row["domicilio"];
echo 
"<option value=".$valor.">".$nom."</option>";

?>
</select>

</td>
<tr>
        <td><input size="70" name='id_correo'  type='hidden' maxlength='90' value="<?php echo $cl?>"></td>
      </tr>
      <tr>
        <td height="44">Correo:</td>
        <td><input size="70" name='correo'  type='text' maxlength='90' value="<?php echo $correo?>"></td>
      </tr>
      <tr>
        <td><input size="70" name='id_tel'  type='hidden' maxlength='40' value="<?php echo $id_telefono?>"></td>
      </tr>    
      <tr>
        <td height="44">Red:</td>
        <td><input size="70" name='tel'  type='text' maxlength='40' value="<?php echo $telefono?>"></td>
      </tr>
      <tr>
        <td><input size="70" name='id_tel'  type='hidden' maxlength='40' value="<?php echo $id_telefono1?>"></td>
      </tr>    
      <tr>
        <td height="44">Fax:</td>
        <td><input size="70" name='tel'  type='text' maxlength='40' value="<?php echo $telefono1?>"></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td><br><input name='submit' type='submit' value='Actualizar'></td>
      </tr>
    </table>