Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/04/2010, 08:37
sergio_o
 
Fecha de Ingreso: abril-2010
Mensajes: 23
Antigüedad: 14 años
Puntos: 0
Exclamación Pregunta!!!Sobre formulario y botones

hola amigosbueno tengo una pregunta saben tengo un formuario que despliega resultados de una consulta a una base este:
Código PHP:
<form action="fom.php"  target='blank' method="post">
            
                    <fieldset>
                        <legend><h3>-Resultados de Busqueda.</h3>    </legend>
                          <table  border="1" align="center" bordercolor="#CCCCCC" class="art-PostContent">
                            <tr align="center" bgcolor="#FFFF99" >
                                <td >Tipo normativa</td>
                                <td >Numero</td>
                                <td >Nombre</td>
                                <td >Estado</td>
                            </tr>
                              <?php
                                        
while($row=mysql_fetch_array($result))
                                        {
                                            echo 
'<tr><td >'.$row["tipo_normativa"].'<input type="hidden" name="tipo" value="'.$row["tipo_normativa"].'"></td>';
                                            echo 
'<td >'.$row["numero_normativa"].'<input type="hidden" name="numero" value="'.$row["numero_normativa"].'"></td>';
                                            echo 
'<td >'.$row["nombre_normativa"].'<input type="hidden" name="nombre" value="'.$row["nombre_normativa"].'"></td>';
                                            echo 
'<td >'.$row["estado_normativa"].'<input type="hidden" name="estado" value="'.$row["estado_normativa"].'"></td>';
                                              echo 
'<td>'.'<input type="hidden" name="normativa" value="'.$row["normativa"].'"></td>';  


echo 
'<td><input type="image" src="../../img/icono_pdf.gif" name="PDF" value="PDF" title="Precione para DESCARGAR PDF.">'.'</td>';

echo 
'<td><input type="image" src="../../img/icono_pdf.gif" name="HTML" value="HTML" title="Precione para HTML.">'.'</td>';

// action="<?php echo $PHP_SELF 
    
    
echo '<td>'."<a href=\"../../cheq-list/".$row['cheq_list'].".pdf\"target='_blank' title=\"Precione para LISTA DE CHEQUEO.\"  >Descargar-Cheq-list</a>".'</td><tr>';
y como ven tengo 2 botones que me llaman a fom.php en donde tengo el siguiente codigo

Código PHP:
<?php
     
    
    
if ($_POST[PDF]) 
    { 
        
//echo ("PDF").'<br>';
        //echo var_dump($_POST);
        
$tipo=$_POST['tipo'];
        
$numero=$_POST['numero'];
        
$estado=$_POST['estado'];
        
$normativa=$_POST['normativa'];
        
//echo $nombre;
        
        
        
        
        
require('../../modulos/pdf/fpdf.php');
        
        class 
PDF extends FPDF
        
{
        
//Cabecera de página
        
function Header()
        {
            
//Logo
            
$this->Image('../../css/images/logobetter-2.jpg',10,8,20);
            
//Arial bold 15
            
$this->SetFont('Arial','B',14);
            
//Movernos a la derecha
            
$this->Cell(80);
            
//Título
            
$this->Cell(30,10,$nombre=$_POST['nombre'],1,0,'C');
            
//Salto de línea
            
$this->Ln(20);
        }
        
        
//Pie de página
        
function Footer()
        {
            
//Posición: a 1,5 cm del final
            
$this->SetY(-15);
            
//Arial italic 8
            
$this->SetFont('Arial','I',8);
            
//Número de página
            
$this->Cell(360,10,'Page '.$this->PageNo(),0,0,'C');
        }
        }
        
        
//Creación del objeto de la clase heredada
        
$pdf=new PDF();
        
$pdf->AliasNbPages();
        
$pdf->AddPage();
        
$pdf->SetFont('Arial','',10);
        
$pdf->MultiCell(0,5,$normativa,0); 
        
$pdf->Output();
        
    
    }
    
    
    
?>
    
<?php
    
if ($_POST[HTML]) 
    { 
        echo(
'<u>'."Titulo de Normativa : ".$nombre=$_POST['nombre'].'</u><br>');
        echo(
'<u>'."Numero de Normativa : ".$numero=$_POST['numero'].'</u><br>');
        echo 
'<div style= "border: 1px solid gray; margin-left: 1cm">'.$normativa=$_POST['normativa'].'</div>';
    
    }
    
?>
en este se visualiza según el botón que presione en el formulario anterior, asta hay todo bien pero ACÁ el problema es que solo puede seleccionar una opción la idea es que pueda apretar cuantas veces quiera cada opción ya sea para PDF o HTML no solo una como podría realizar esto amigos???


DE ANTEMANO MUCHAS GRACIAS:::::