Od wczoraj probuje napisac prosty system logowania do administracji. Napisalem form i skrypt logowania, ale jest problem. Otoz gdy wchodze na strone logowania, juz na poczatku wywala blad o blednym logowaniu. Gdy wypelnie dane formularza, tj. login i haslo, strona odswierza sie, nie loguje, lecz wysypuje takie bledy:[CODE]Warning: session_register() [function.session-register]: Cannot send session cookie - headers already sent by (output started at c:\documents and settings\tomek\Pulpit\www\admin\index.php:8) in c:\documents and settings\tomek\Pulpit\www\admin\index.php on line 23
Warning: session_register() [function.session-register]: Cannot send session cache limiter - headers already sent (output started at c:\documents and settings\tomek\Pulpit\www\admin\index.php:8) in c:\documents and settings\tomek\Pulpit\www\admin\index.php on line 23
Warning: Cannot modify header information - headers already sent by (output started at c:\documents and settings\tomek\Pulpit\www\admin\index.php:8) in c:\documents and settings\tomek\Pulpit\www\admin\index.php on line 25
[panel logowania]
Warning: Unknown: Your script possibly relies on a session side-effect which existed until php 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0[CODE]
Nie wiem co z tym zrobic.
Podaje tresc skryptu i form'a:
<?php $nick=$_POST['nick']; $pass=$_POST['pass']; $sql="SELECT * FROM admini WHERE nick='$nick' and pass='$pass'"; if($count==1){ } else { } ?>
Wszystko jest w jednym pliku.