Ver Mensaje Individual
  #5 (permalink)  
Antiguo 04/08/2007, 10:54
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Re: como seleccionar una fila con un boton desde en php sin javascript??

Como te comento necesitas poner en dado caso el enlace o un form (te recomiendo el enlace), luego hacer tu SQL borrar el registro y re-dibujar la tabla, algo asi:
Código PHP:
if( !empty( $_GET['idAlumno'] ) {
      
$sql "DELETE FROM alumnos WHERE idAlumno=". (int) $_GET['idAlumno'];
      
// query etc.
}

echo 
"<form id='form3' name='form3' method='post' action=''>
<table width='117%' height='66' border='1'>"
;

echo
"
<tr>
<th width='14%' height='28' class='navLink' scope='col'>id_alumno</th>
<th width='15%' class='navLink' scope='col'>Apellido</th>
<th width='25%' class='navLink' scope='col'>Boton</th>
</tr>
"
;
$destino $_SERVER['PHP_SELF'];

while(
$fila=mysql_fetch_array($resul)){

echo
"<tr>
<td height='28' align='center'> $fila[id_Alumno]</td>

echo"
<td align='center'>$fila[Apellido] </td>
<
td align='center'><a href="$destino?idAlumno=" $fila['idAlumno'] . "\">Borrar</a></td>
</tr>"
;

}
echo
"
</table>
</form>"