Ver Mensaje Individual
  #9 (permalink)  
Antiguo 23/11/2009, 12:28
Avatar de ColdFusion
ColdFusion
 
Fecha de Ingreso: octubre-2008
Ubicación: Tocoa, Colon Honduras C.A.
Mensajes: 419
Antigüedad: 15 años, 6 meses
Puntos: 9
Respuesta: Problema con header("Location:.......

Ami no me funciona y eso que ya leii todo lo que pusieron aqui miren lo:

Código PHP:
<?
if($Submit){
$agregado == FALSE;
if(
$name == "")
{
$error_message "Porfavor ingresa tu nombre";
}else
if(
$email == "")
{
$error_message "Porfavor ingresa tu Email";
}else
if(
$message == "")
{
$error_message "Porfavor escribe tu mensaje";
}else
// check to see if verificaton code was correct
if(md5($verif_box).'a4xn' == $_COOKIE['savasguestbook']){
$message str_replace("<""&lt;"$message);
$message str_replace(">""&gt;"$message);
mysql_query ("INSERT INTO entries (name, email, message , date, approved) VALUES ('$name', '$email', '$message', '$date', 'Yes')");
$agregado TRUE;
$error_message "$name your entry was submitted succesfully but it will appear on the website after admin moderation.";

}
else
{
$error_message "Porfavor ingresa el codigo de verificacion correcto";
}
}
?>
<table class="entry"><tr><td class="info"><h2>Agregar Mensaje</h2></td></tr><tr><td><? echo $error_message?>
<form action="" method="post" />
<table align="center">
<tr><td>Nombre:</td><td><input type="text" name="name" value="<? echo $name?>" /></td></tr>
<tr><td>Email:</td><td><input type="text" name="email" value="<? echo $email?>" /></td></tr>
<tr><td>Mensaje:</td><td><textarea name="message" rows="5" cols="55"><? echo $message?></textarea></td></tr>
<tr>
<td>Verificacion:</td>
<td><input type="hidden" name="verificationnr" value="<? echo '' $verificationnr '';?>" /><img src="verificationimage.php?<?php echo rand(10000,99999);?>" alt="verification image, type it in the box" width="60" height="24" align="left" />  <input type="text" id="verif_box" name="verifbox" maxlength="5" size="5" /></td></tr>
<tr><td style="border: none;"></td><td style="border: none;"><input type="submit" name="Submit" /></td></tr></table>
</td></tr></table>
</div>
<div id="sidebar">
<h2>Navegacion</h2>
<ul>
<li><a href="index.php" title="Home">Lista de Mensajes</a></li>
<li><a href="agregar.php">Agregar Mensaje</a></li>
</ul>
<h2>Otros enlaces</h2>
<ul>
<li><a href="../index.php">Inicio</a></li>
<li><a href="../noticias/">Noticias</a></li>
<li><a href="../comentarios/">Comentarios</a></li>
<li><a href="../galeria.php">Galeria</a></li>
<li><a href="../descargas.php">Descargas</a></li>
</ul>
<br />
<br />

</div>
</div>
<? 
include('../inc/pie.php'); 
if (
$agregado == TRUE) {
header("Location:index.php"); 
exit(); 
 }
?>
La var $agregado es para ver si ya se envio y luego redireccionar al index, pero no funciona