<?
include("../../bd-con.php");
mysqli_query($conn,"SET NAMES 'utf8'");
include("../../funciones.php");
$sql = "SELECT * FROM ".$tabla." WHERE id=".$_GET['id'];
//echo $sql;
$res = mysqli_query($conn,$sql) or die (mysqli_error($conn));
$numeroRegistros = mysqli_num_rows($res);
$array_res = mysqli_fetch_array ($res);
if( $numeroRegistros <= 0){
echo "Lo sentimos, pero esta noticia ya no existe";
$res="";
exit;
} else {
$titulo = $array_res['titulo'];
$texto = $array_res['texto'];
$imagen = $array_res['imagen'];
$ruta = "img/".$array_res['imagen'];
}
?>