Ver Mensaje Individual
  #2 (permalink)  
Antiguo 10/11/2014, 14:03
mauritosuarez
 
Fecha de Ingreso: octubre-2014
Ubicación: Buenos Aires
Mensajes: 278
Antigüedad: 9 años, 6 meses
Puntos: 12
Respuesta: Mandar variables desde formulario $_SERVER['PHP_SELF']

Hola Any_x, tienes que agregar tu código dentro de un form para enviar los datos.


Código PHP:
Ver original
  1. echo "<form name='form' method='POST' action=''>";
  2.  
  3. echo"<div style='top:200px; left:10px ; position: absolute'>";
  4.            echo"<th width='50' class='tg-5392'>Paleta</th>";
  5.                      echo"<th width='50' class='tg-5392'>Posicion</th>";
  6.                      echo"<th width='100' class='tg-5392'>Fecha Salida</th>";
  7.                      echo"<th width='100' class='tg-5392'>Obs. Salida</th>";
  8.                      
  9.                      while ($fila = $result->fetch_array(MYSQLI_ASSOC))  
  10.                 {
  11.  
  12.                     echo"<tr>";
  13.  
  14.                     echo "<td class='tg-ek65'>";
  15.                     echo $fila ["salida"];
  16.                     echo "</td>";
  17.                     echo "<td class='tg-ek65'>";
  18.                     echo $fila ["obs_salida"];
  19.                     echo "</td>";
  20.                     //Aqui va el boton
  21.                      
  22.                     echo "<td class='tg-ek65'>";
  23.                      
  24. //////aqui en este input me gustaria tomar el valor del id  
  25.               echo "<input type='hidden' name='ID' value="$fila['id']">";
  26. ///tabien el detalle es como lo mando o no se si lo estoy mandando bien
  27.                     echo "<input type='submit' name='Modificar' value='Modificar' />";
  28.                     echo "</td>";
  29.                      
  30.                      
  31.                     echo "</tr>";
  32.  
  33.                     }
  34.                     echo"</table>";
  35.                     echo"</div>";
  36.                     echo"<br>";
  37.                     echo"<br>";  
  38.  
  39. echo "</form>";


y al principio del archivo agregas este código
Código PHP:
Ver original
  1. <?php
  2. if(isset($_POST)) {
  3.     print $_POST["ID"];
  4. }
  5. ?>
__________________
http://www.sp-vision.net