Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/11/2007, 16:14
maral
 
Fecha de Ingreso: octubre-2007
Mensajes: 14
Antigüedad: 16 años, 6 meses
Puntos: 0
Pregunta refrescar enviando variables

hola!!!!
tengo una duda, ¿se puede enviar una variable si hago un refresco de página?

tengo el siguiente archivo, que se llama guardar_comentario.php, y hago un refresco al archivo del que venía anteriormente, que se llama ampliar_articulo.php.
El problema es que este archivo ampliar_articulo a su vez le enviaban los archivos anteriores la variable IDARTICULO, que aquí también la recibo, pero no sé como enviarla al hacer el refresco porque sino me da fallo.

Este archivo es guardar_comentario.php:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Refresh" content="1;URL=ampliar_articulo.php">
<title>Documento sin t&iacute;tulo</title>
</head>

<body>
<?

require('../funciones/funciones.php');
require('../mysql.php');

if (db_open("proyecto")==FALSE)
{
echo "fallo de conexión"; //Conexion con la base de datos
exit;
}

$fecha=date("Y/m/d");
$hora=date("H:i:s");

$PUNTUACION=$_POST ["puntuacion"];
$TEXTO=$_POST["texto"];
$IDARTICULO=$_POST["idarticulo"]; //coger elementos que se envían del formulario de insertar_datos
$LAFECHA=$fecha." ".$hora;

//metemos los datos en la tabla articulos dentro de la base de datos

$sql="INSERT INTO comentarios SET

PUNTUACION='$PUNTUACION',
TEXTO='$TEXTO',
IDARTICULO='$IDARTICULO',
FECHA='$LAFECHA'";

if (($regs=db_execute($sql))==FALSE)
{
echo "fallo al insertar registro";
exit;
}

?>

</body>
</html>


Muchas gracias!