My problem is. I have 2 codes.
Code one
Code: Select all
while ($mysql_query_array_x = mysql_fetch_row($mysql_query_id)){
echo '<li><a class="menu" href="index.php?page=article&aid='.$mysql_query_array_x[0].'" title="'.$mysql_query_array_x[2].'">'.$mysql_query_array_x[1].'</a></li>';
}Code: Select all
setcookie('username', $login, time()-600);
setcookie('pass', $pass, time()-600);
echo '<div style="text-align: center; margin: 90px 0;"><h3>Wylogowywanie...</h3><img src="images/bar_loading.gif"><br />';
echo 'Za chwile zostaniesz przeniesiony na stron? g?ówn?.</div>';
header('Refresh: 1; url=index.php');Everything works just fine when i put one lime comment in code one. Just like:
Code: Select all
while ($mysql_query_array_x = mysql_fetch_row($mysql_query_id)){
//echo '<li><a class="menu" href="index.php?page=article&aid='.$mysql_query_array_x[0].'" title="'.$mysql_query_array_x[2].'">'.$mysql_query_array_x[1].'</a></li>';
}Code: Select all
echo '<li><a class="menu" href="index.php?page=article&aid='.$mysql_query_array_x[0].'"What code one generates and outputs to page is:
Code: Select all
<li><a class="menu" href="index.php?page=article&aid=11" title="Komunikacja Miejska">Komunikacja</a></li><li><a class="menu" href="index.php?page=article&aid=10" title="Informacje Turystyczne">Turystyka</a></li><li><a class="menu" href="index.php?page=article&aid=1" title="Konstancin jako Uzdrowisko">Zdrowie</a></li>I got completly no idea what to do....
PS: Code one is a method of a class and is called first
Code two is simple function called further in script.
Server have output buffering enabled.
edit:
Ok. i changed "output_buffering = 5120" from "output_buffering = 4096" and it started working... does it mean, my page can't fit into buffer and ouputs something before outputs headers (incl cookies)??
When i Removed one link (set it not to display) cookies executed but header() did not. Does it mean my buffor is too small?? What size would you recommend to set it too??