Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> przekierowanie w do innej strony, Warning: Cannot modify header informatio
-memento-
post
Post #1





Goście







witam,
mam prosty mechanizm uwierzytelnienia goscia w postaci:
  1. <?php
  2.  
  3. if ($login==$_POST['login'] && $haslo==$_POST['haslo'])
  4. {
  5. print "brawo";
  6. $_SESSION['zalogowany']=1;
  7. header("location=zalograport.php");
  8. }
  9. kiedy przeslane haslo i login sa zgodne z zadanymi wyswietla sie tylko napis brawo i trecs taka jak na
     dole, natomiast nie ma przekierowania na strone zalograport.php
  10. (zawartośc: 
  11. <?
  12. if (!isset($_SESSION['zalogowany']))
  13. {
  14. header("location:lograport.php");
  15. }
  16. echo"dostep tylko po zalogowaniu";
  17. ?>



Warning: Cannot modify header information - headers already sent by (output started at /mnt/nfs/vhost/home/*****/*******/www/html/test/lograport.php:16) in /mnt/nfs/vhost/home/*****/*******/www/html/test/lograport.php on line 27


~mike_mech
Go to the top of the page
+Quote Post

Posty w temacie


Closed TopicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 07:31