Jostino Posted March 6, 2012 Posted March 6, 2012 i need to add in php.ini this command: output_bufferingbecause i have a problem with the output echo before the header
Jostino Posted March 6, 2012 Author Posted March 6, 2012 i know, in fact, i request that was added by the admin if you can
Byron Posted March 6, 2012 Posted March 6, 2012 This support request is being escalated to our root admin.
Jostino Posted March 6, 2012 Author Posted March 6, 2012 thanks, if u know another solution for the collision of the output and header("Refresh..") problem i'm happy to know it!
viclou Posted March 6, 2012 Posted March 6, 2012 Please be aware that these changes will affect all users on whatever server you're on...
Byron Posted March 6, 2012 Posted March 6, 2012 Can you post the code and explain exactly what it's doing?
viclou Posted March 6, 2012 Posted March 6, 2012 ...and can you post your helihost username along with what server you're on?
Jostino Posted March 6, 2012 Author Posted March 6, 2012 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
Byron Posted March 6, 2012 Posted March 6, 2012 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!";
Jostino Posted March 6, 2012 Author Posted March 6, 2012 ..... 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
Jostino Posted March 7, 2012 Author Posted March 7, 2012 can i substitute the header(); with the exit();? found solution: <script>setTimeout('top.location = \'index.php\'', 1000);</script>
Recommended Posts