if (!isset($_GET["Id"]) OR $_GET["Id"]<1) { $Id=1; } else { $Id=$_GET["Id"]; settype($Id,'integer'); } $pegar = "SELECT ID FROM escolares_posts WHERE guid LIKE '%Id=".$Id."%'"; include 'conexion.php'; $rs = mysql_db_query($base,$pegar) or die (mysql_error()); $FILAS=mysql_fetch_object($rs); Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: http://www.escolares.net/?p=".$FILAS->ID); //echo "Location: http://www.escolares.net/?p=".$FILAS->ID; ?>