Ver Mensaje Individual
  #5 (permalink)  
Antiguo 15/11/2014, 11:59
Avatar de maiksix
maiksix
 
Fecha de Ingreso: noviembre-2014
Ubicación: Sabadell
Mensajes: 124
Antigüedad: 9 años, 5 meses
Puntos: 1
Respuesta: Crear filtro en la misma página

Hola Djoaq,

realmente el código entero es este:
Código:
 
<table style="background: #C5C5C5; width:664px; height:669px; margin-left:38px; margin-top:30px; border:black 1px solid; float:left;">
						<tr style="height:10px;">
                                                </tr>
                                                <tr>
                                                <tr style= "margin-top:20px;">
						<?php
						$consulta = "SELECT *
						FROM Articles
						WHERE seccion=".$_GET['secc']."
						AND estado_noticia = 'Publicado'
						ORDER BY fecha desc";
                                                echo $consulta."<br>";
						$result = mysql_query($consulta,$con);
						while($row = mysql_fetch_array($result)){
                                                $variable = explode ('/',$row['fecha']);
                                                echo "<tr style='margin-top:-30px;'> ";
						$foto = $row['timestamp']."_".$row['imagen1'];
						echo "<td><font color='black'><a style='text-decoration:none;' href='noticias?idNoticia=".$row['id']."'><img style='width:50px; height:32px; margin-left:10px;border:black 1px solid;margin-top:-55px;' src='ImagenesNoticias/".$foto."'/></a> </font></td>";
						echo "<td><font color='black'><p style='margin-letf:-90px;margin-top:-50px;'><a style='text-decoration:none;' href='noticias?idNoticia=".$row['id']."'><i>$variable[2]/</i></p></a> </font></td>";
						echo "<td><font color='black'><p style='margin-letf:-100px;margin-top:-50px; float:left;'><a style='text-decoration:none;' href='noticias?idNoticia=".$row['id']."'><i>$variable[1]/</i></p></a> </font></td>";
						echo "<td><font color='black'><p style='margin-letf:-150px;margin-top:-50px;float:left;'><a style='text-decoration:none;' href='noticias?idNoticia=".$row['id']."'><i>$variable[0]</i></p></a> </font></td>";
                                                echo "<td><font color='black'><a style='text-decoration:none;' href='noticias?idNoticia=".$row['id']."'><p style= 'width:280px; margin-top:0px;margin-top:-50px;'><b>".$row['titulo']."</p></b>";
						echo "</a> </font></td></tr>";
						}
						?>
						</tr>
                                                </tr>
					</table>
Tengo un par de dudas de tu comentario:

¿Que gano al hacer un echo $consulta."<br>";? Simplemente veo que en la pagina me sale el codigo que esta despues de $consulta=

El tipo de dato que se guarda en "seccion" en la BD es varchar, no debería ser eso no? Ya que se pasa correctamente en el formulario, cierto?

A que te refieres con: prueba de insertar el texto tal cual en algún gestor de sql phpmyadmin por ejemplo y veras el error con mas detalle.
Quieres decir que haga un insert en vez de un select, para ver si se guarda adecuadamente?

Tomo nota de la ext, me lo miro y lo aplicare.

Muchas gracias
__________________
Going hard for too long... Can't get enough