Ver Mensaje Individual
  #1 (permalink)  
Antiguo 27/02/2008, 06:19
shembao
 
Fecha de Ingreso: febrero-2008
Mensajes: 73
Antigüedad: 17 años
Puntos: 0
procesar formulario en la misma pagina

hola... quisiera saber como lo puedo hacer para que al presionar buscar se me procece la informacion y se me entregue un resultado ...

hasta el momento no puedo no entiendo que ocurre

Código:
 
<form name="form" method="post">
				  </p>
				</p>
				<table width="80%" border="0" cellspacing="1">
                  <tr>
                    <td width="8%"><img src="images/buscar_arancel.jpg"class="floatTL" alt="Something scenic" /></td>
                    <td width="8%">Buscar</td>
                    <td width="24%"><input type="text" name="buscar" size="30" /></td>
                    <td width="5%"></td>
                    <td width="63%">
                    <input type="submit" name="Button1" value="Buscar" /></td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>
                </table>
                <br />
<?php
			{

 $query= "SELECT 
		  pais.PAIS_NOMBRE,
		  pais.PAIS_COD
		FROM
		  cliente,
		  articulo,
		  formulario,
		  valor_articulo,
		  empresa,
		  pais,
		  detalle
		WHERE
		  articulo.ARTICULO_COD = detalle.ARTICULO_COD AND 
		  valor_articulo.VALOR_COD = detalle.VALOR_COD AND 
		  formulario.FORMULARIO_COD = detalle.FORMULARIO_COD AND 
		  cliente.CLIENTE_RUT = formulario.CLIENTE_RUT AND 
		  empresa.EMPRESA_COD = formulario.EMPRESA_COD AND 
		  empresa.PAIS_COD = pais.PAIS_COD AND
		  articulo.ARTICULO_NOMBRE LIKE '%$_POST[buscar]%'
		GROUP BY
		  PAIS_COD";
					   
						   
    $consulta		 = mysql_query( $query ) or die( "Problema :" .mysql_error() ) ;
          
    echo "<table width=\"100%\" border=\"1\" cellspacing=\"1\">" ;
    echo "<thead>" ;
    echo "<tr>" ;
    echo "<th>", "DIN", "</th>" ;
    echo "<th>", "Articulo", "</th>" ;
    echo "<th>", "Clasificación", "</th>" ;
    echo "<th>", "Valor USD", "</th>" ;
    echo "<th>", "Empresa", "</th>" ;
    echo "<th>", "Procedencia", "</th>" ;
    echo "<th>", "Persona", "</th>" ;
    echo "<th>", "Rut", "</th>" ;
    echo "</tr>" ;
    echo "</thead>" ;
    echo "<tbody>" ;

    while ( $row = mysql_fetch_array($consulta_mercancia)){
        echo "<tr>" ;
        echo "<td>", "$row[din]", "</td>" ;
        echo "<td>", "$row[art]", "</td>" ;
        echo "<td>", "$row[clasif]", "</td>" ;
        echo "<td>", "$row[valor]", "</td>" ;
        echo "<td>", "$row[empresa]", "</td>" ;
        echo "<td>", "$row[pais]", "</td>" ;
        echo "<td>", "$row[nombre]", "</td>" ;
        echo "<td>", "$row[rut]", "</td>" ;
        echo "</tr>" ;
        //echo " <br/>";
    }
    echo "</tbody>" ;
    echo "</table>" ;

}
 ?>
gracias... espero uan ayuda

Última edición por shembao; 27/02/2008 a las 06:42