remove the lines with these code:
- session_start();
-
session_register("username");
-
session_encode();
-
$url="Location:loggedin.php?PHPSESSID=".$PHPSESSID;
-
header($url);
so you can see if your logic is actually working. maybe the code is echoing something even when you give the correct username and password.
That error message is caused if any output is given (whitespace not within the <php tags included) before the call to session_start() or header() function.
I once had this problem with the fckeditor code and couldn't find any extra whitespace in the entirety of the fckeditor library, and i have never found out what the problem was.
EDIT:
Quote:
Quote:
Originally Posted by
Note: If you are using cookie-based sessions, you must call session_start() before anything is outputted to the browser.
just add session_start() to the very first line of your page before anything is outputted to the browers.
Brettl i think that might have been the problem that i encountered.