Ver Mensaje Individual
  #3 (permalink)  
Antiguo 13/04/2014, 16:34
Roxmorf
 
Fecha de Ingreso: abril-2014
Mensajes: 13
Antigüedad: 10 años
Puntos: 0
Respuesta: Pasar fila de tabla html a otro archivo php

No me falla el botón, el boton va perfectamente, si hago eso tendria que poner que el boton es de tipo submit.
He aqui lo que se me ve antes de pulsar el boton:
Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
  2. "http://www.w3.org/TR/html4/strict.dtd">
  3.  
  4. <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
  5.     <head>
  6.         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7.         <title>listado</title>
  8.         <meta name="author" content="Manuel Botet" />
  9.         <!-- Date: 2013-09-27 -->
  10.         <link href="../../estilo.css" rel="stylesheet" type="text/css" />
  11.     </head>
  12.     <body>
  13.         <h1>Listado de vendedores</h1>
  14.         Vendedores en la base de datos: 11<br/>Se muestran 3 vendedores por página <br/>Mostrando vendedores del 1 al 3<table border='1' ><form name='formulario' method='post'><th>Borrado</th><th>Modificación</th><th>Id</th><th>Nombre</th><th>Oficina</th><tr><td><input type='checkbox' value='1' name='check[]'/></td>
  15.                           <td><input type='radio' value='1' name='modificacion'></td><td>1</td><input type='hidden' value='1' name='tabla[0][Id]'/><td>Paco</td><input type='hidden' value='Paco' name='tabla[0][Nombre]'/><td>13</td><input type='hidden' value='13' name='tabla[0][Oficina]'/></tr><tr><td><input type='checkbox' value='8' name='check[]'/></td>
  16.                           <td><input type='radio' value='8' name='modificacion'></td><td>8</td><input type='hidden' value='8' name='tabla[1][Id]'/><td>pepito</td><input type='hidden' value='pepito' name='tabla[1][Nombre]'/><td>20</td><input type='hidden' value='20' name='tabla[1][Oficina]'/></tr><tr><td><input type='checkbox' value='9' name='check[]'/></td>
  17.                           <td><input type='radio' value='9' name='modificacion'></td><td>9</td><input type='hidden' value='9' name='tabla[2][Id]'/><td>Lucia</td><input type='hidden' value='Lucia' name='tabla[2][Nombre]'/><td>6</td><input type='hidden' value='6' name='tabla[2][Oficina]'/></tr>            <tr><td colspan='5'><input type='submit' value='Confirmar borrado' onclick="this.form.action='borrar.php'"/></td></tr>
  18.             <tr><td colspan='5'><input type='submit' value='Modificar' onclick="this.form.action='modificar.php'"/></td></tr>
  19.             <tr><td colspan='5'><input type='submit' value='Insertar nuevo vendedor' onclick="this.form.action='insertar.php'"/></td></tr></table></form>
  20.         <br/><a href='listado.php?pagina=2'>Siguiente</a><br/>       <a text-align="right" href="index.html">Menú Principal</a>
  21.         </table>
  22.     </body>
  23. </html>

y aqui algo como lo que me debería mostrar

Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
  2. "http://www.w3.org/TR/html4/strict.dtd">
  3.  
  4. <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>modificar</title>
  7. <meta name="author" content="Manuel Botet" />
  8. <link href="../../estilo.css" rel="stylesheet" type="text/css" />
  9. <style type="text/css">table{background-color: rgb(255,255,100);}</style>
  10. </head>
  11.     <body>
  12.             <table><form action="modificar.php" method="post">
  13.                 <tr><td>Id: </td><td><input type="text" readonly="readonly" value="8" /></td></tr>
  14.                 <tr><td>Nombre: </td><td><input type="text" name="nombre" value="" /></td></tr>
  15.                 <tr><td>Oficina: </td><td><input type="text" name="oficina" value="" /></td></tr>
  16.                 <input type="hidden" name="idmodificar" value="8" />
  17.                 <tr>
  18.                     <td colspan="2"><input type="reset" value="Borrar datos"/><input type="submit" value="Confirmar modificacion"/></td>
  19.                 </tr>
  20.             </form></table>
  21.             </body>
  22. </html>

A ver si se me ve bien.... si no intentaré editarlo