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.