Mi problema es que no puedo resolver esta última parte.
Tengo el header, el menú lateral y el footer que son fijos, lo que cambia es el contenido.
En el index tengo:
Código PHP:
<?
if(isset($_GET["pagina"]) and $_GET["pagina"]!="index" )
{
$pag=$_GET["pagina"].".php";
}else
$pag="noticias.php";
?>
<?
include("funciones.php");
?>
<div class="head"><? include("header.php"); ?></div>
<div class="sidenavizq"><? include("menu.php");?></div>
<div class="contenido"><? include($pag);?></div>
<div class="footer"><? include("pie.php");?></div>
En noticiaPpal:
Código PHP:
<?php
if($_GET["id"]!="")
{
$nota = getNoticias($_GET["id"]);
}else{
$nota = getNoticiasXCantidad(1);
}
if($noticia = mysql_fetch_array($nota))
{
echo
'<div class="titulares"><b>'.$noticia["titulo"].'</b></div>
<div class="container">
<img src="img_noticias/'.$noticia["foto"].'" width="280" height="150"><br><br>
'.substr($noticia["texto"],0,380)
.'
<a href="index.php?verNoticia='.$noticia["id"].'">+ info</a> //acá estaría el problema
</div>'
;
}
?>
verNoticia.php:
Código PHP:
<?
include("funciones.php");
if($_GET["id"]!="")
{
$nota = getNoticias($_GET["id"]);
}else{
$nota = getNoticiasXCantidad(1);
}
if($noticia = mysql_fetch_array($nota))
{
echo
'<div class="titulares"><a href=# >Noticia</a></div>
<div class="container">
<img src="img_noticias/'.$noticia["foto"].'" width="280" height="150"><br>
<b>'.$noticia["titulo"].'</b><br>
'.$noticia["texto"].'
</div>'
;
}
include("noticiaMenu.php");
?>
Gracias.