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

Saludos pertdona que no lo mostre. Este es el codigo php:

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

<form>

<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);
$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/>



<?php

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

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



mysql_close($con);
?>


<html>
<body>

<a href="http://localhost/xampp/hr/index.html">Proximo Record</a>
</body>
</html>





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

</form>
</html>