Ver Mensaje Individual
  #1 (permalink)  
Antiguo 07/03/2009, 04:31
microtrendcine
 
Fecha de Ingreso: marzo-2009
Mensajes: 5
Antigüedad: 16 años, 1 mes
Puntos: 0
mostrar resultados en portada php

hola tengo 2 paginas php.

una que se llama portada.php y otra que se llama consulta.php.

El caso es que quiero que me muestre los resultados de la consula.php en portada.php en la columna 2 de css. muchas gracias

el codigo de la consulta.php es este:

<?php
$con = mysql_connect("localhost","root","aroca");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

mysql_select_db("segundamano", $con);

$result = mysql_query("SELECT * FROM anuncio");

echo "<table border='1'>
<tr>
<th>nombre</th>
<th>apellidos</th>
<th>direccion</th>
<th>telefono</th>
<th>titulo</th>
<th>texto</th>
<th>provincia</th>
<th>categoria</th>
<th>precio</th>

</tr>";while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['nombre'] . "</td>";
echo "<td>" . $row['apellidos'] . "</td>";
echo "<td>" . $row['direccion'] . "</td>";
echo "<td>" . $row['telefono'] . "</td>";
echo "<td>" . $row['titulo'] . "</td>";
echo "<td>" . $row['texto'] . "</td>";
echo "<td>" . $row['provincia'] . "</td>";
echo "<td>" . $row['categoria'] . "</td>";
echo "<td>" . $row['precio'] . "</td>";
echo "</tr>";
}
echo "</table>";mysql_close($con);
?>