Ver Mensaje Individual
  #5 (permalink)  
Antiguo 18/02/2008, 11:24
esi
 
Fecha de Ingreso: febrero-2008
Mensajes: 3
Antigüedad: 16 años, 3 meses
Puntos: 0
Re: ayuda con botones php

gracias gente, pero... sige sin funcionar...


el codigo se ha quedado asi


Código PHP:
<tr>
<
br>
<
th>Id</th>
<
th>Alumno</th>
<
th>Evalución</th>
<
th>Notas</th>
<
th>Fecha</th>
<
th>Observaciones</th>
</
tr>";

while ($f<$numregistros)
{
echo "
<tr>";
    
    $registro=mysql_fetch_row($consulta3);
    while ($c<6)
    {
    echo "
<td>".$registro[$c]."</td>";
    $c++;
    }
echo "
<th><input type='button' value='Borrar' onclick=window.open('borrar.php?id=".$registro[$c]."','borrar') /></th>";  
echo "
</tr>";
$c=0;
$f++;
}
echo "
</table>"; 

y he creado una pag que se llama borrar.php que tiene esto



Código PHP:
<html>
<body>
<?php 

    

$mysql_server
="localhost";
$mysql_login="*****";
$mysql_pass="*****";

$conexion=mysql_connect($mysql_server,$mysql_login,$mysql_pass) or die ("error");
mysql_select_db("clase",$conexion);


 if(isset(
$_GET['id']))
{  
   
$query "DELETE FROM notas
                   WHERE id= '"
.$_GET['id']."'";
   
mysql_query($query);
   
   
}
        
echo 
"Nota eliminada<br>";
echo 
"Datos Actualizados<br>";
echo 
"Pulse <a href=frames2.php>aquí</a> para volver";


?>        
</body>
</html>

no hay manera llevo toda la tarde... seguramente sea una tonteria pero tengo tengo q hacer 1000 cosillas y esta se me resiste...

Última edición por esi; 18/02/2008 a las 13:53