Ver Mensaje Individual
  #1 (permalink)  
Antiguo 06/05/2013, 09:51
Avatar de kakashi20
kakashi20
 
Fecha de Ingreso: septiembre-2009
Mensajes: 616
Antigüedad: 15 años, 4 meses
Puntos: 15
Exclamación recargar despues de submit

hola tengo el siguiente codigo el cual hago una tabla dinamica de ciertos datos y cada lista tiene un boton submit para crear un pdf, el cual me lo descarga al hacer clic. el problema que tengo es que cuando creo el pdf ciertos parametros del registro de la fila seleccionada cambian y por tal motivo deberia de recargar la pagina, pero no sabria como hacer despues de dar clic en el boton submit.

si alguien me pudiese ayudar se lo agradeceria.

Código PHP:
Ver original
  1. <table>
  2.            
  3.    
  4.             <tr>
  5.                
  6.                 <td></td>
  7.                 <td style="font-weight:bold">ID</td>
  8.                
  9.                 <td style="font-weight:bold">Cliente</td>
  10.                 <td style="font-weight:bold">Fecha</td>
  11.                 <td style="font-weight:bold">Horas</td>
  12.                 <td style="font-weight:bold">Direcci&oacute;n</td>
  13.                 <td style="font-weight:bold">Estado</td>
  14.                 <td style="font-weight:bold">Persona Encargada</td>
  15.                 <td style="font-weight:bold">Contrato</td>
  16.                 <td style="font-weight:bold">Fecha Cierre</td>
  17.                 <td></td>
  18.                
  19.             </tr>
  20.          
  21.            
  22.              
  23. <?
  24.  
  25. $nit = $_POST['nit'];
  26.        
  27.  
  28.             $query = mysql_query("select * from servicios_facturacion WHERE estado = 'Cerrada' AND empresa = '$nit' ORDER BY id desc");
  29.             $i=0;
  30.            
  31.             while($row = mysql_fetch_assoc($query)){
  32.                
  33.                
  34.                
  35.                
  36.                 echo "<tr class='fila_".($i%2)."'>";
  37.                    
  38.                     echo "<td><input type='checkbox' name='s".$i."' id='s".$i."' value='$row[id]'></td>";
  39.                     echo "<td> $row[id] </td> ";
  40.                    
  41.                     echo "<td>".$cliente."</td> ";
  42.                    
  43.                     echo "<td> $row[fecha_entrada] </td> ";
  44.                     echo "<td>".$horanueva." </td> ";
  45.                     echo "<td>".$dir." </td> ";
  46.                     echo "<td> $row[estado] </td> ";
  47.                     echo "<td>".mysql_result($query_sql,0,"p_nombre")." ".mysql_result($query_sql,0,"s_nombre")." ".mysql_result($query_sql,0,"p_apellido")." ".mysql_result($query_sql,0,"s_apellido")." </td> ";
  48.                     echo "<td> $row[contrato] </td> ";
  49.                     echo "<td> $row[fecha_cierre] </td> ";
  50.                    
  51.                     echo "<form name='formfactura' action='Facturar_pdf.php'  method='post'>";
  52.                    
  53.                         echo "<input type='hidden' name='id' value='$row[id]'>";
  54.                         echo "<td><input type='submit' value='Facturar'></td>";
  55.                        
  56.                     echo "</form>";
  57.                    
  58.                 echo "</tr>";
  59.                 $i++;
  60.             }
  61.            
  62.            
  63.             echo "</table>";