Ver Mensaje Individual
  #2 (permalink)  
Antiguo 03/08/2007, 12:00
aosuna
 
Fecha de Ingreso: julio-2007
Mensajes: 14
Antigüedad: 17 años, 7 meses
Puntos: 0
Re: como seleccionar una fila con un boton desde una tabla en php

Cita:
Iniciado por vixtor_jyp Ver Mensaje

Aqui va el codigo cualquier cosa.

<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>
";

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'><label>

<input type='submit' name='submit' value='enviar' />
</label></td>
</tr>";

}
echo"
</table>
</form>";
Has pensado en hacer un script que te recoja los tres valores

<script language="Javascript">

function exportar(id, apellidos)
{
document.frmEnviar.id_alumno_elegido.value = id;
document.frmEnviar.apellido_elegido.value = apellidos;
document.frmEnviar.target="_self";
document.frmEnviar.action="/* aki pones a la pagina donde quieras llevar los datos que recogeras mediante un $_POST['id_alumno_elegido'] y
$_POST['apellido_elegido'] */";
document.frmEnviar.submit();
}

</script>

<form name="frmFormulario" method="POST">
<input type="hidden" name="id_alumno_elegido">
<input type="hidden" name="apellido_elegido">
</form>