Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> sesja znika ?
cornholio666
post
Post #1





Grupa: Zarejestrowani
Postów: 472
Pomógł: 8
Dołączył: 14.03.2004
Skąd: Rzeszów

Ostrzeżenie: (0%)
-----


Witam.

mam takie cos:

plik sesja.html

  1. <form action="sesja.php" method="post">
  2. <input type="text" name="login">
  3. <input type="submit">
  4. </form>



plik sesja.php

  1. <?php
  2. $_SESSION['login'] = $_POST['login'];
  3.  
  4. if($_SESSION['login'] == 'abc')
  5. {
  6. ?>
  7.  
  8. <html>
  9. <head>
  10. </head>
  11. <body>
  12. <form method=\"post\">
  13. <input type=\"submit\" value=\"xx\">
  14. </form>
  15. <?php
  16. }
  17. else
  18. {
  19. die(&#092;"brak dostepu\");
  20. }
  21. ?>
  22. </body>
  23. </html>


Wpisuje w sesja.html "abc" przekazuje do sesja.php i ładnie wszytko wyswietla niby sesja jest ale jak klikne przycisk "xx" wyskakuje mi moj komunikat "brak dostepu" dlaczego sesja "znika" (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 24.08.2025 - 00:37