Ver Mensaje Individual
  #6 (permalink)  
Antiguo 03/10/2012, 08:16
Avatar de acousticgerman
acousticgerman
 
Fecha de Ingreso: abril-2004
Ubicación: Merlo, buenos aires
Mensajes: 364
Antigüedad: 20 años
Puntos: 1
De acuerdo Respuesta: While con un IF

mirá aquí paso el código completo:

<?


$libre = $_POST['libre'];



include("connection.php");


$connect= mysql_connect($host,$username, $password);
$select_db= mysql_select_db($db_name, $connect);



if(mysql_num_rows($libre)==0)

{

echo "no hay resultados";

}

else

{

$cadbusca= "SELECT * FROM destinos WHERE nombre_destino LIKE '%$libre%' OR fecha_salida LIKE

'%$libre%' OR transporte LIKE '%$libre%' OR nombre_hotel LIKE '%$libre%' OR descripcion LIKE

'%$libre%' OR costo LIKE '%$libre%'";



$result=mysql_query($cadbusca);

While($row=mysql_fetch_array($result))

{

echo "


<tr>





<td width='100px' height='100px' rowspan='6'>

<img src='panel/pics_destinos/" .$row['user_picture']. "' width='100px' height='100px'>


</td>


<td>

<b><font size='3' color='ORANGE'>" .$row['nombre_destino']. "</b></font>

</td>


</tr>

<tr>

<td>

<font size='1' color='white'>" .$row['fecha_salida']. "</font>
</td>


</tr>


<tr>

<td>

<font size='1' color='white'>" .$row['transporte']. "</font>

</td>


</tr>


<tr>

<td>

<font size='1' color='white'>" .$row['nombre_hotel']. "</font>

</td>


</tr>

<tr>

<td width='200px'>

<font size='1' color='white'>" .$row['descripcion']. "</font>

</td>

</tr>


<tr>

<td width='400px'>

<font size='1' color='red'>Costo:</font> <font size='2' color='white'><b>" .$row['costo'].

"</b></font>
<br><a href='contactos.php'><img src='layout/consultar.png' border='0' width='62px'

height='20px'></a>

<br>
<BR>

</td>




";

}
__________________
"Life goes on..."