Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] Wylogowanie z ?id=wyloguj
Selevan
post 31.10.2010, 20:43:12
Post #1





Grupa: Zarejestrowani
Postów: 18
Pomógł: 0
Dołączył: 31.10.2010

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


  1. <?php
  2. $db = mysql_connect('localhost', 'xxx', 'xxx') or die ('Database Failure');
  3. mysql_select_db('xxx', $db) or die('xx');
  4. if ( isset( $_SESSION['user'] ))
  5. {
  6. ?>
  7. :: <A HREF="index.php?id=wyloguj">Wyloguj</A> ::</span>
  8. <?php }
  9. else
  10. { ?>
  11. :: <a href="login.php">Login</a> ::</span>
  12. <? } ?>
  13. <?php
  14. $db = mysql_connect('localhost', 'xxx', 'xxx') or die ('Database Failure');
  15. mysql_select_db('xxx', $db) or die('xx');
  16. if(!isset($id)) {
  17. }
  18. else if ($id='wyloguj'){
  19. }
  20. ?>


I tutaj wylogowywanie nie dziala.. tzn pokazuje sie opcja :: Wyloguj :: kiedy jestem zalogowany, ale gdy w nia klikam to owszem, wchodzi w strone xxx/index.php?id=wyloguj, ale dalej jestem zalogowany. Nie wiecie o co chodzi ?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 4)
pedro84
post 31.10.2010, 20:54:13
Post #2





Grupa: Nieautoryzowani
Postów: 2 249
Pomógł: 305
Dołączył: 2.10.2006

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


Podpowiedź: skąd wytrzasnąłeś $id?


--------------------
Google knows the answer...
Go to the top of the page
+Quote Post
Selevan
post 31.10.2010, 21:01:27
Post #3





Grupa: Zarejestrowani
Postów: 18
Pomógł: 0
Dołączył: 31.10.2010

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


a jak powinno byc ?
Go to the top of the page
+Quote Post
pedro84
post 31.10.2010, 21:06:28
Post #4





Grupa: Nieautoryzowani
Postów: 2 249
Pomógł: 305
Dołączył: 2.10.2006

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


Nie przypadkiem $_GET['id']?


--------------------
Google knows the answer...
Go to the top of the page
+Quote Post
Wicepsik
post 31.10.2010, 21:08:23
Post #5





Grupa: Zarejestrowani
Postów: 1 575
Pomógł: 299
Dołączył: 26.03.2009

Ostrzeżenie: (20%)
X----


http://www.php.net/manual/en/language.oper....comparison.php

przypisanie i porównanie to dwie rożne rzeczy


--------------------
Go to the top of the page
+Quote Post

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

 



RSS Wersja Lo-Fi Aktualny czas: 27.06.2025 - 15:27