<?
include ("../includes/config.php");
include ("../includes/funciones.php");
//nos conectamos a mysql
$cnx = conectar ();
$nombreTabla = $_GET['nt'];
$id= $_GET['idReg'];
if (!tabla_existe($nombreTabla,$DATABASE)){
echo "Lo sentimos, pero esta noticia ya no existe";
$res="";
exit;
}else{
$sql = "SELECT id, titulo, texto, imagen, enlace, tituloenlace FROM ".$nombreTabla." WHERE id='".$id."' ORDER BY orden ASC";
$res= mysql_query($sql) or die (mysql_error());
$array_res=mysql_fetch_array ($res);
$titulo = $array_res['titulo'];
$imagen = $array_res['imagen'];
$texto = $array_res['texto'];
$textodeurl = $array_res['tituloenlace'];
$url = $array_res['enlace'];
mysql_close($cnx);
}
?>