Ver Mensaje Individual
  #10 (permalink)  
Antiguo 02/11/2010, 09:13
Avatar de Heiroon
Heiroon
 
Fecha de Ingreso: junio-2010
Ubicación: Caracas, Venezuela - Por ahora...
Mensajes: 495
Antigüedad: 13 años, 11 meses
Puntos: 63
Respuesta: Tratando de update a Record from MySql

prueba sin el bucle, como es un solo registro por vez no hace falta.. me parece q es cerca de ahi.. ahi tienes

Código PHP:
Ver original
  1. <html>
  2. <form>
  3.   <?php
  4.  
  5. $con = mysql_connect("localhost","root","");
  6. if(!$con)
  7. {
  8. die('Could not connect: ' . mysql_error());
  9. }
  10.  
  11. mysql_select_db("hoja", $con);
  12. $Estudiante= "'".$_POST['Estudiante']."'";
  13. $result = mysql_query("SELECT * FROM hr WHERE Numero=$Estudiante");
  14. $row = mysql_fetch_array($result); ?>
  15.   Numero de Estudiante:
  16.   <input type="text" name="Estudiante" value="<?=$row['Numero']?>"/>
  17.   Nombre:
  18.   <input type="text" name="nombre" value="<?=$row['Nombre']?>" />
  19.   Fecha:
  20.   <input type="text" name="fecha" value="<?=$row['Fecha']?>" />
  21.   <br/>
  22. </form>
  23. </html>