Mam problem dotyczący nagłówków i sesji. Otórz zrobilem system logowania którego kod jest podany poniżej:
<? if($_SESSION['LOGGEDIN'] != TRUE){ exit; } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <meta name="generator" content="Adobe GoLive" /> <title>Admin Login</title> <link href="admin.css" rel="stylesheet" type="text/css" media="all" /> </head> <body bgcolor="#ffffff"> <? require_once 'functions.php'; // echo "<B>".$_SESSION['LOGGEDIN']."</b>"; if($_SESSION['LOGGEDIN'] == TRUE){ exit; } if($_POST[user] && $_POST[pass]){ $user=$_POST[user]; $pass=$_POST[pass]; $sql = "SELECT * FROM users WHERE USR_name = '$user' AND USR_passwd = PASSWORD('$pass') "; $wynik = query($sql); $_SESSION['LOGGEDIN'] = TRUE; $_SESSION['USERNAME'] = $user; exit; } else fail("Podano niewłaściwe dane!"); } else fail("Proszę podać nazwę użytkownika i hasło."); ?> <form method="POST" action="login.php" style="margin-top:50px"> <table width="324" border="0" cellspacing="3" cellpadding="0" align="center"> <tr> <td width="152"> Nazwa użytkownika:</td> <td><input type="text" size="20" name="user" /></td> </tr> <tr> <td width="152"> Hasło:</td> <td><input type="password" name="pass" size="20" /></td> </tr> </table> <br> <br> <center><input type="submit" value="zaloguj"/></center> </body> </html>

poprawiam
---
nospor
Gdy to wszystko testowalem lokalnie działało bezproblemowo. Po wrzuceniu tego na serwer zaczelo szales nieziemsko wywalająć mi masębłędów
Cytat
Cannot modify header information - headers already sent by (...)
session_start(): Cannot send session cookie - headers already sent by (...) (
session_start(): Cannot send session cookie - headers already sent by (...) (
Próbowałem już rzeczy typu ob_start() - ob_flush(), usówanie pustych znaków etc, nie wiem ale jakośnic nie chce działa. Prosze o pomoc jest to BARDZ ważne.
Z góry diękuję.