Ver Mensaje Individual
  #4 (permalink)  
Antiguo 25/03/2007, 00:41
Avatar de TheViejo
TheViejo
 
Fecha de Ingreso: marzo-2007
Ubicación: Delante de mi Vetusto PC.
Mensajes: 29
Antigüedad: 17 años, 1 mes
Puntos: 3
Re: En localhost me errores..., mientras que en el servidor me funciona...

Prueba esto :

Archivo respuesta.php:

Código PHP:
<?php
require('funciones.php');
$id False;
if (isset(
$_GET["id"]))
 
$id $_GET["id"];
$citar False;
if (isset(
$_GET["citar"]))
 
$citar $_GET["citar"];

$row = array("id" => $id);
if(
$citar==1)
{
    require(
'configuracion.php');
    
$sql "SELECT titulo, mensaje, identificador AS id FROM foro WHERE id='$id'";
    
$rs mysql_query($sql$con);
    if(
mysql_num_rows($rs)==1$row mysql_fetch_assoc($rs);
    
$row["titulo"] = "Re: ".$row["titulo"];
    
$row["mensaje"] = "[citar]".$row["mensaje"]."[/citar]";
    if(
$row["id"]==0$row["id"]=$id;
}
$template implode(""file('formulario.html'));
include(
'header.html');
mostrarTemplate($template$row);
include(
'footer.html');
?>
Archivo index.php :

Código PHP:
     

 <?php 
require('configuracion.php'); 
require(
'funciones.php'); 
include(
'header.html'); 
/* Pedimos todos los temas iniciales (identificador==0) 
* y los ordenamos por ult_respuesta */ 
$sql "SELECT id, autor, titulo, fecha, respuestas, ult_respuesta "
$sql.= "FROM foro WHERE identificador=0 ORDER BY ult_respuesta DESC"
$rs mysql_query($sql$con); 
if(
mysql_num_rows($rs)>0

    
// Leemos el contenido de la plantilla de temas 
    
$template implode(""file("temas.html")); 
    include(
'titulos.html'); 
      
$color False;
    while(
$row mysql_fetch_assoc($rs)) 
    { 
        
$color=($color==""?"#5b69a6":""); 
        
$row["color"] = $color
        
mostrarTemplate($template$row); 
    } 

include(
'footer.html'); 
?>
Espero que te sirvan.