Tema: No modifica
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 01/04/2008, 13:22
huascar
 
Fecha de Ingreso: julio-2007
Mensajes: 114
Antigüedad: 17 años, 6 meses
Puntos: 0
Pregunta No modifica

Ayuda me modifica el primer registro por ejemplo los demas regitros de la bd no me los modifica yo le doy para modificar por lo menos el segundo registro y no hace nada y de paso necesito que me de un mensaje de regiostros modificados ayuden porfa

Código PHP:
<table align="center">
<TR>
<TD><img src="imagenes/banner_up.jpg" width="780" height="57"></TD>
</TR>
</table><br>
<table  BORDERCOLOR="blue" border="5" align="center" height="0" width="950"> 
<br>
<TR>
<TD><br>
<table align="left" border="5" BORDERCOLOR="blue">
<TR>
<TD>
<div id="menuv" align="left" >
    <ul>
        <li><a href="#menuv">Inicio</a></li>
        <li><a href="disco.php">Ingresar</a></li>
        <li><a href="buscar.php">Buscar</a></li>
        <li><a href="report.php">Reporte</a></li>
            </ul>
</div>


</TD>
</TR>
</table>
<table align="center"><TR><TD>
<?php 
$nu
=$_GET["nu"];
$link mysql_connect("localhost""root""hj1761984");
mysql_select_db("sesiones"$link);
$result=mysql_query("SELECT nu,equipo,marca,serial,tip,ubicacion,cant,observacion FROM discos WHERE nu='$nu'"$link);

if (
$row mysql_fetch_array($result)){
?>
<form onsubmit="return validar(this)" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="GET" name="frm"> 
<tr>
<TD><INPUT type="text" name="nu" value="<? echo $row['nu'?>"></TD>
<TD><INPUT type="text" name="equipo" value="<? echo $row['equipo'?>"></TD>
</tr>
<tr>
<TD><INPUT type="text" name="marca" value="<? echo $row['marca'?>"></TD>
<TD><INPUT type="text" name="serial" value="<? echo $row['serial'?>"></TD>
</tr>
<tr>
<TD><INPUT type="text" name="tip" value="<? echo $row['tip'?>"></TD>
<TD><INPUT type="text" name="ubicacion" value="<? echo $row['ubicacion'?>"></TD>
</tr>
<tr>
<TD><INPUT type="text" name="cant" value="<? echo $row['cant'?>"></TD>
<TD><INPUT type="text" name="observacion" value="<? echo $row['observacion'?>"></TD>

</tr>
<INPUT type="submit" name="modificar" value="modificar">
<?php 

if(isset(
$_GET['modificar'])){    
$host="localhost";
$user="root";
$pass="hj1761984";
$db="sesiones";
$link=@mysql_connect($host,$user,$pass)or die (exit(mysql_error()));
mysql_select_db($db);

$set="nu='".$_GET['nu']."',equipo='".$_GET['equipo']."',marca='".$_GET['marca']."',serial='".$_GET['serial']."',tip='".$_GET['tip']."',ubicacion='".$_GET['ubicacion']."',cant='".$_GET['cant']."',observacion='".$_GET['observacion']."'";


mysql_query("UPDATE discos SET $set"$link);


}
  
?>
</tr></TR></table>