Jump to content

Recommended Posts

Posted

The code is header("Refresh: 1; URL= index.php");

 

and it's put in this code:

 

 

elseif ($p == "logout") {
   session_destroy();
   echo "Logout effettuato con successo!";
   header("Refresh: 1; URL= index.php");
   ob_end_flush();

 

and here

 

if($verificadati == 1) {	 
   $sessione = mysql_fetch_array($recuperadati);
   $_SESSION['username'] = $sessione['username'];	  
   echo "Login effettuato con successo!";
   header("Refresh: 1; URL= index.php");
   ob_end_flush();

 

the code header auto-refresh the page after a command

Posted

With those codes you posted the header refresh shouldn't even work. You can't have any html output before the header function.

 

wrong:

echo "Logout effettuato con successo!";
header("Refresh: 1; URL= index.php");

 

right:

header("Refresh: 1; URL= index.php");
echo "Logout effettuato con successo!";

Posted

..... However,the refresh functionsoI do notdo any good

 

and will not work because there are already included in the beginning of the output in header.php

Posted

can i substitute the header(); with the exit();?

 

found solution:

 

<script>setTimeout('top.location = \'index.php\'', 1000);</script>

Guest
This topic is now closed to further replies.
×
×
  • Create New...