Ver Mensaje Individual
  #4 (permalink)  
Antiguo 15/10/2009, 06:26
Avatar de camilo_1987
camilo_1987
 
Fecha de Ingreso: junio-2008
Ubicación: ALZIRA, Spain, Spain
Mensajes: 77
Antigüedad: 18 años, 5 meses
Puntos: 0
Respuesta: Noticia php y mysql por multilenguaje

noticia.php cual???
Código PHP:
<?php

require("header.php");
?>
<div class="noticia"><?  
$server
="localhost";  
$username="root";  
$password="980980";  
$database="candemasjor";  
$offset = 5; //Numero de noticias  
$posicion = (int) ($_GET["pos"]*$offset); //Numero de noticia desde la cual va a empezar a mostrarlas  
$siguiente = $_GET["pos"]+1; //variable siguiente  
$anterior = $_GET["pos"] == 0 ? 0 : $_GET["pos"]-1; //variable anterior  
$limit = " LIMIT ".$posicion.", ".$offset;  

$connection=mysql_connect ($server, $username, $password);  
mysql_select_db($database, $connection);  
$tbl = 'noticia' . $lang; // Entonces, $tbl será noticiaes o noticiaen
$sentencia=mysql_db_query("candemasjor", "SELECT * FROM $tbl ORDER BY id DESC".$limit);
while(
$rs=mysql_fetch_array($sentencia)){  
?>
<br/> <? echo $rs["Titulo"]; ?><? echo $rs["Fecha"]; ?><? echo $rs["Texto"]; ?>
<br/><? } ?>
  <?php
require("ads.php");
?>
</div>
<?php
require("footer.php");
?>