Mam problem z tym skryptem połowa jest w HTML a druga połowa w PHP.
.Wyświetla mi się komunikat :
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at D:\Program Files (x86)\WebServ\httpd\index.php:10) in D:\Program Files (x86)\WebServ\httpd\index.php on line 21
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at D:\Program Files (x86)\WebServ\httpd\index.php:10) in D:\Program Files (x86)\WebServ\httpd\index.php on line 21
Tajne dane
Wyloguj
Kod PHP:
<?php
session_start();
if (isset($_GET['akcja']) && $_GET['akcja']=='wyloguj'){
unset($_SESSION['zalogowany']);
}
if (isset($_POST['pass']) && $_POST['haslo']=='demo1'){
$_SESSION['zalogowany'] = 1;
}
if(isset($_SESSION['zalogoway'])) {
?>
<center>
<br />
<form method="post" action="">
<input type="text" name="login" maxlength="15"><br />
<input type="password" name="pass" maxlength="15"><br />
<input type="submit" value="Zaloguj">
</form></center>
<?php
}else {
?>
Tajne dane<br />
<a href="index.php?akcja=wyloguj">Wyloguj</a>
<?php
}
?>
.Wyświetla mi się komunikat :
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at D:\Program Files (x86)\WebServ\httpd\index.php:10) in D:\Program Files (x86)\WebServ\httpd\index.php on line 21
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at D:\Program Files (x86)\WebServ\httpd\index.php:10) in D:\Program Files (x86)\WebServ\httpd\index.php on line 21
Tajne dane
Wyloguj