Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Blad z sesjami ;/
Forum PHP.pl > Forum > Przedszkole
Skorp
Oto blad:
  1. <?php
  2. Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at c:&#092;usrkrasnalwwwskorpmmorpgindex.php:12) in c:usrkrasnalwwwskorpmmorpgindex.php on line 28
  3.  
  4. ?>




A oto plik ze strona:
  1. <html>
  2. <head>
  3. <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-2\">
  4. <title>::::: MMORPG :::::</title>
  5. <meta name=\"Description\" content=\"\">
  6. <meta name=\"Keywords\" content=\"\">
  7. <meta name=\"Author\" content=\"Michal Pedzich\">
  8. <meta name=\"Generator\" content=\"AceHTML 4 Freeware\">
  9. <link rel=\"stylesheet\" href=\"style.css\" type=\"text/css\">
  10.  
  11. </head>
  12. <BODY text=FFFFFF vlink=FFCC00 bgcolor=000000>
  13.  
  14. <center>
  15. <table cellspacing=0 cellpading=0 width=760 border=1>
  16. <tr>
  17. <td valign=top>
  18.  
  19. <table cellspacing=0 cellpading=0 width=100% border=1>
  20. <tr><td align=center height=150><SPAN CLASS=block>logo</SPAN></td></tr>
  21. </table>
  22. <table cellspacing=0 cellpading=0 width=100% border=1>
  23. <tr>
  24. <td width=25% valign=top>
  25. <table cellspacing=0 cellpading=0 width=100% height=100% border=0>
  26. <tr><td>
  27. <?php
  28. $dbh = mysql_connect (&#092;"localhost\", \"root\", \"sedcxink\") or die ('Niemoge sie polaczyc z baza: ' . mysql_error());
  29. $db_name=&#092;"gra2\";
  30. $db = mysql_select_db($db_name,$dbh) or die (&#092;"nie moge wybrac bazy\");
  31.  
  32. if($login!=&#092;"\" && $xxhaslo!=\"\") // wykonywane jeżeli podano jak&plusmn;kolwiek
  33. { // warto&para;ć: login lub hasło 
  34. echo '<SPAN CLASS=title2>Witaj, </SPAN><SPAN CLASS=block>'.$login.'</SPAN><br/>';
  35.  
  36. $sql = mysql_query('SELECT lvl FROM gracze WHERE login=''.$_POST['login'].'' ') or Die (&#092;"zapytanie X\");
  37.  
  38. $lvl = mysql_fetch_row($sql) or Die (&#092;"dieeeeee\");
  39. echo '<SPAN CLASS=title2>Level </SPAN><SPAN CLASS=block>'.$lvl[0].'</SPAN><br/>';
  40. }
  41. $nick=$_POST['login'];
  42. $haslo=$_POST['xxhaslo'];
  43.  
  44. $_SESSION['nick'] = $nick;
  45. $_SESSION['haslo'] = $haslo;
  46. ?>
  47. </td></tr>
  48. <tr><td background=img/menu_bg.gif align=center class=title>MENU</td></tr>
  49. <tr>
  50. <td>
  51. <img src=\"img/grandmagering.gif\" width=\"13\" height=\"12\"><a href=\"index.php\" style=\"text-decoration: none\">Strona Główna</a><br>
  52. <img src=\"img/grandmagering.gif\" width=\"13\" height=\"12\"><a href=\"index.php?page=logowanie\" style=\"text-decoration: none\">Logowanie</a></br>
  53. <img src=\"img/grandmagering.gif\" width=\"13\" height=\"12\"><a href=\"index.php?page=signup\" style=\"text-decoration: none\">Rejestracja</a><br>
  54. </td>
  55. </tr>
  56. </table>
  57. </td>
  58. <td width=100%>
  59. <?
  60. if ($_GET['page'] == &#092;"test\") { include (\"test.php\"); }
  61. else if ($_GET['page'] == &#092;"logowanie\") { include (\"login.php\"); }
  62. else if ($_GET['page'] == &#092;"signup\") { include (\"signup.htm\"); }
  63. else { include (&#092;"news.php\"); }
  64. ?>
  65. </td>
  66. </tr>
  67. </table>
  68.  
  69.  
  70.  
  71. </td>
  72. </tr>
  73. </table>
  74.  
  75. </center>
  76. </body>
  77. </html>

Co jest zle ;/ plsss i need help
dasko
LoL...tyle razy było na forum... najpierw powinieneś poszukać...

Do przeglądarki nie można wysłać danych przed rozpoczęciem sesji... Albo umieść session_start" title="Zobacz w manualu PHP" target="_manual na samym początku, albo użyj ob_start" title="Zobacz w manualu PHP" target="_manual...
aleksander
zamykam. odsyłam do wyszukiwarki forum lub wiki
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.