Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Menu i switch
Peter12
post
Post #1





Grupa: Zarejestrowani
Postów: 18
Pomógł: 1
Dołączył: 15.08.2010

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


Witam mam problem z php mianowicie zrobiłem sobie menu na switch i teraz chcę robić tak:
index.php?strona=druzyny&nazwadruzyny Wie ktoś jak to zrobić?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Peter12
post
Post #2





Grupa: Zarejestrowani
Postów: 18
Pomógł: 1
Dołączył: 15.08.2010

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


Mam coś takiego:
  1. <?php
  2. switch($_GET['strona'])
  3. {
  4. case 'newsy':
  5. include('indexgl.php');
  6. break;
  7.  
  8. case 'terminarz':
  9. include('terminarz.php');
  10. break;
  11.  
  12. case 'druzyny':
  13. include('druzyny.php');
  14. break;
  15.  
  16. case 'regulamin':
  17. include('regulamin.php');
  18. break;
  19.  
  20. case 'galeria':
  21. include('galeria.php');
  22. break;
  23.  
  24. default:
  25. include('indexgl.php');
  26. break;
  27. }?>

Gdzie dodać drugie $_GET?
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: 14.10.2025 - 09:56