![]() |
![]() |
![]()
Post
#1
|
|
![]() Grupa: Zarejestrowani Postów: 54 Pomógł: 0 Dołączył: 19.05.2007 Skąd: Lębork Ostrzeżenie: (0%) ![]() ![]() |
Witam! Znów mam problem. Mam taki kod:
CODE panel_form.php <? session_start(); $login=$_POST['login']; $haslo=$_POST['haslo']; if(isset($login) && ($haslo)) { $uchwyt = fopen("haslo.txt", "r+"); $tresc = fread($uchwyt, filesize("haslo.txt")); fclose($uchwyt); //zamykamy if($login == "admin" && $haslo == $tresc) { session_register("admin"); header('Location: panel_script.php'); } else { ?> <html> <center> <h2>Podano zły login lub hasło!</h2> </center> </html> <? } } else { ?> <html> <center> <table border=1 cellspacing=0 cellpadding=0 bordercolor=black width=50% height=200px> <tr> <td width=100% height=200px> <center> <form method=post action=panel_form.php> Login: <br> <input type=text size=10 name=login> <br> Hasło: <br> <input type=password size=10 name=haslo> <br> <input type=submit value=Log in> </form> </center> </td> </tr> </table> </center> </html> <? } ?> i: CODE panel_script.php <? session_start() //start sesji if(isset($_SESSION['admin'])) { ?> <html> <center> <a href=logout.php>Wyjdź, wyloguj</a> </center> </html> <? } else { echo "Nie jesteś zalogowany"; } ?> No i mam taki problem. Otóż z pierwszym skryptem jest wszystko w pozadku (chyba ![]() Cytat Parse error: syntax err in /virtual/e/r/erykwojdyla.ugu.pl/panel_script.php on line 3 Proszę o pomoc, powiedzenie mi co mam zle i ewentualnie naprowadzenie mnie na wlasciwy trop. Z gory dzieki. Ten post edytował Eron 28.09.2007, 22:02:30 -------------------- Jestem początkujący. Nie uważam się za mistrza. Pamiętaj! Wyrażam tylko swoją opinię |
|
|
![]() |
![]()
Post
#2
|
|
![]() Grupa: Zarejestrowani Postów: 44 Pomógł: 0 Dołączył: 21.06.2007 Ostrzeżenie: (0%) ![]() ![]() |
Nie masz średnika po session_start()
![]() -------------------- . . .
|
|
|
![]() ![]() |
![]() |
Aktualny czas: 21.08.2025 - 07:34 |