Ver Mensaje Individual
  #5 (permalink)  
Antiguo 01/06/2010, 07:10
DiegoRivera2010
 
Fecha de Ingreso: abril-2010
Mensajes: 50
Antigüedad: 14 años, 11 meses
Puntos: 0
Respuesta: Ayuda DW y MYSQL

Código PHP:
Ver original
  1. <div id="Layer2">
  2.   <form action="<?php echo $editFormAction; ?>" method="post" name="actualizar" id="actualizar">
  3.        <table width="938" border="1" align="center" bordercolor="#FFFFFF" bgcolor="">
  4.     <tr valign="baseline">
  5.       <td colspan="3" align="right" nowrap><div align="center" class="Estilo2">DATOS PERSONALES </div></td>
  6.     </tr>
  7.     <tr valign="baseline">
  8.       <td width="325" align="right" nowrap><span class="Estilo1">Nombre:
  9.           <input type="text" name="nombre" value="<?php echo $row_actualizar1['nombre']; ?>" size="32">
  10.       </span></td>
  11.       <td width="276" nowrap="NOWRAP"><span class="Estilo1">Sexo:(M/F)
  12.           <input type="text" name="sexo" value="<?php echo $row_actualizar1['sexo']; ?>" size="2">
  13.       </span></td>
  14.       <td width="315" nowrap="NOWRAP"><span class="Estilo1">Cedula
  15.           <input type="text" name="cedula" value="<?php echo $row_actualizar1['cedula']; ?>" size="15">
  16.       </span></td>
  17.     </tr>
  18.     <tr valign="baseline">
  19.       <td align="right" nowrap><span class="Estilo1">Direccion
  20.           <input type="text" name="direccion" value="<?php echo $row_actualizar1['direccion']; ?>" size="32">
  21.       </span></td>
  22.       <td colspan="2" nowrap="NOWRAP"><div align="left" class="Estilo1">Barrio
  23.           <input type="text" name="barrio" value="<?php echo $row_actualizar1['barrio']; ?>" size="32">
  24.       </div></td>
  25.     </tr>
  26.     <tr valign="baseline">
  27.       <td align="right" nowrap><span class="Estilo1">Telefono Residencia:  
  28.           <input type="text" name="tel_residencia" value="<?php echo $row_actualizar1['tel_residencia']; ?>" size="32">
  29.       </span></td>
  30.       <td nowrap="NOWRAP"><span class="Estilo1">Telefono Celular        
  31.       :      
  32.           <input type="text" name="tel_celular" value="<?php echo $row_actualizar1['tel_celular']; ?>" size="15">
  33.       </span></td>
  34.       <td nowrap="NOWRAP"><span class="Estilo1">Correo:        
  35.           <input type="text" name="correo" value="<?php echo $row_actualizar1['correo']; ?>" size="30">
  36.       </span></td>
  37.     </tr>
  38.     <tr valign="baseline">
  39.       <td align="right" nowrap><p class="Estilo1">No Usar Espacios Ni Caracteres Especiales </p>
  40.         <p class="Estilo1">Fecha Nacimiento (aaaammdd):
  41.       <input type="text" name="fecha" value="<?php echo $row_actualizar1['fecha']; ?>" size="8" /></p></td>
  42.       <td colspan="2" nowrap="NOWRAP"><p class="Estilo1">&nbsp;</p>
  43.         <p class="Estilo1">Estado Civil Actual
  44.           <input type="text" name="estado_civil" value="<?php echo $row_actualizar1['estado_civil']; ?>" size="10">
  45.       </p></td>
  46.     </tr>
  47.     <tr valign="baseline">
  48.       <td height="79" align="right" nowrap><p align="left" class="Estilo1">Mascota (Si/No):
  49.           <input type="text" name="mascota" value="<?php echo $row_actualizar1['mascota']; ?>" size="2">
  50.         </p>
  51.         <p align="left" class="Estilo1">Tipo De Mascota:
  52.           <input type="text" name="tipo_mascota" value="<?php echo $row_actualizar1['tipo_mascota']; ?>" size="25">
  53.       </p></td>
  54.       <td nowrap="NOWRAP"><p class="Estilo1">Carro (Si/No):
  55.           <input type="text" name="carro" value="<?php echo $row_actualizar1['carro']; ?>" size="2">
  56.       </p>
  57.         <p class="Estilo1">Modelo Carro :
  58.           <input type="text" name="marca_carro" value="<?php echo $row_actualizar1['marca_carro']; ?>" size="20">
  59.       </p></td>
  60.       <td nowrap="NOWRAP"><p class="Estilo1">Moto (Si/No):
  61.           <input type="text" name="moto" value="<?php echo $row_actualizar1['moto']; ?>" size="2">
  62.       </p>
  63.         <p class="Estilo1">Modelo Moto:
  64.           <input type="text" name="marca_moto" value="<?php echo $row_actualizar1['marca_moto']; ?>" size="25">
  65.       </p></td>
  66.     </tr>
  67.     <tr valign="baseline">
  68.       <td colspan="3" align="right" nowrap><div align="center" class="Estilo2 Estilo1">INFORMACION LABORAL </div></td>
  69.     </tr>
  70.     <tr valign="baseline">
  71.       <td align="right" nowrap><span class="Estilo1">Ocupacion:
  72.           <input type="text" name="ocupacion" value="<?php echo $row_actualizar1['ocupacion']; ?>" size="32">
  73.       </span></td>
  74.       <td nowrap="NOWRAP"><span class="Estilo1">Empresa :
  75.           <input type="text" name="lug_de_trabajo" value="<?php echo $row_actualizar1['lug_de_trabajo']; ?>" size="25">
  76.       </span></td>
  77.       <td nowrap="NOWRAP"><span class="Estilo1">Telefono:
  78.           <input type="text" name="tel_trabajo" value="<?php echo $row_actualizar1['tel_trabajo']; ?>" size="10">
  79.       </span></td>
  80.     </tr>
  81.     <tr valign="baseline">
  82.       <td colspan="3" align="right" nowrap><div align="center" class="Estilo2 Estilo1">INFORMACION FAMILIAR </div></td>
  83.     </tr>
  84.     <tr valign="baseline">
  85.       <td align="right" nowrap><p class="Estilo1">&nbsp;</p>
  86.         <p class="Estilo1">Nom_Pareja:
  87.           <input type="text" name="nombre_pareja" value="<?php echo $row_actualizar1['nombre_pareja']; ?>" size="20">
  88.       </p>      </td>
  89.       <td nowrap="NOWRAP"><p class="Estilo1">No Usar Espacios Ni Caracteres Especiales</p>
  90.         <p align="center" class="Estilo1">Fecha Nacimiento (aaaammdd):
  91.           <input type="text" name="fecha_pareja" value="<?php echo $row_actualizar1['fecha_pareja']; ?>" size="8">
  92.         </p></td>
  93.       <td nowrap="NOWRAP"><p class="Estilo1">N&ordm; Personas en su Vivienda:
  94.         <input type="text" name="num_perso_vive" value="<?php echo $row_actualizar1['num_perso_vive']; ?>" size="2">
  95.       </p>
  96.       <p class="Estilo1">N&ordm; de Hijos:
  97.         <input type="text" name="num_hijos" value="<?php echo $row_actualizar1['num_hijos']; ?>" size="2">
  98. </p></td>
  99.     </tr>
  100.     <tr valign="baseline">
  101.       <td colspan="3" align="right" nowrap><div align="center" class="Estilo2 Estilo1">Nombre Completo Hijos</div></td>
  102.     </tr>
  103.     <tr valign="baseline">
  104.       <td colspan="3" align="right" nowrap><div align="center" class="Estilo1">
  105.         <input type="text" name="nombre_hijo1" value="<?php echo $row_actualizar1['nombre_hijo1']; ?>" size="32">
  106.       </div></td>
  107.     </tr>
  108.     <tr valign="baseline">
  109.       <td colspan="3" align="right" nowrap>      <div align="center" class="Estilo1">
  110.         <input type="text" name="nombre_hijo2" value="<?php echo $row_actualizar1['nombre_hijo2']; ?>" size="32">
  111.       </div></td>
  112.     </tr>
  113.     <tr valign="baseline">
  114.       <td colspan="3" align="right" nowrap>      <div align="center" class="Estilo1">
  115.         <p>No Usar Espacios Ni Caracteres Especiales</p>
  116.         <p>Fecha Nacimiento Hijos (aaaammdd) </p>
  117.       </div></td>
  118.     </tr>
  119.     <tr valign="baseline">
  120.       <td colspan="3" align="right" nowrap>      <div align="center" class="Estilo1">
  121.         <input type="text" name="fecha_hijo1" value="<?php echo $row_actualizar1['fecha_hijo1']; ?>" size="8">
  122.       </div></td>
  123.     </tr>
  124.     <tr valign="baseline">
  125.       <td colspan="3" align="right" nowrap>      <div align="center" class="Estilo1">
  126.         <input type="text" name="fecha_hijo2" value="<?php echo $row_actualizar1['fecha_hijo2']; ?>" size="8">
  127.       </div></td>
  128.     </tr>
  129.     <tr valign="baseline">
  130.       <td colspan="3" align="right" nowrap><div align="center" class="Estilo1">
  131.         <input type="submit" value="Actualizar Registro">
  132.       </div></td>
  133.     </tr>
  134.   </table>
  135.  
  136.    
  137.           <td>&nbsp;</td>
  138.           </tr>
  139.       </table>
  140.       <input type="hidden" name="MM_update" value="form1">
  141.       <input type="hidden" name="cedula" value="<?php echo $row_actualizar1['cedula'];
  142.  
  143.       ?>">
  144.     </form>
  145.     <p>&nbsp;</p>
  146.     <p>&nbsp;</p>
  147. </div>
  148. <p>&nbsp;</p>
  149. </body>
  150. </html>
  151. <?php
  152. mysql_free_result($actualizar1);
  153. ?>
pero el problema es que me muestra el primer dato de la tabla de la bd y quiero actualizar el dato antes introducido en el buscador gracias espero me hallas entendido gracias