Ver Mensaje Individual
  #15 (permalink)  
Antiguo 03/11/2010, 11:12
cesar31
 
Fecha de Ingreso: octubre-2010
Mensajes: 26
Antigüedad: 13 años, 6 meses
Puntos: 0
Respuesta: Problemas Update un record

<html>
<Body>
<h1><b><big> Actualizar Record <h1>

<form>

Gracias por tu ayuda

<form method="post" action="actualizadat.php">



<?php

$con = mysql_connect("localhost","root","");
if(!$con)
{
die('Could not connect: ' . mysql_error());
}


mysql_select_db("hoja", $con);


$nombre=$_POST['nombre'];
$fecha=$_POST['fecha'];

mysql_query("UPDATE hr SET Nombre ='$nombre',Fecha='$fecha'
WHERE Numero=$Estudiante");



mysql_close($con);
?>


<?php

$con = mysql_connect("localhost","root","");
if(!$con)
{
die('Could not connect: ' . mysql_error());
}


mysql_select_db("hoja", $con);
$Estudiante=$_POST['Estudiante'];

$result = mysql_query("SELECT * FROM hr
WHERE Numero='$Estudiante'");
$row = mysql_fetch_array($result); ?>

Numero de Estudiante:
<input type="text" name="Estudiante" value="<?php echo ($row['Numero']);?> "/>
Nombre:
<input type="text" name="nombre" value="<?php echo ($row['Nombre']);?> " />
Fecha:
<input type="text" name="fecha" value="<?php echo ($row['Fecha']);?> " />
<br/>




<input type="submit" value="Seguir" />

</form>
</html>
<html>