Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP]Dwie zmienne w Adresie WWW
Gaw3l
post 18.07.2010, 16:22:26
Post #1





Grupa: Zarejestrowani
Postów: 13
Pomógł: 0
Dołączył: 14.02.2010

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


Udało się smile.gif
Dziękuję panom poniżej winksmiley.jpg

Ten post edytował Gaw3l 18.07.2010, 17:21:32
Go to the top of the page
+Quote Post
tehaha
post 18.07.2010, 16:26:24
Post #2





Grupa: Zarejestrowani
Postów: 1 748
Pomógł: 388
Dołączył: 21.08.2009
Skąd: Gdynia

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


tak, dokładnie tak jak napisałeś kolejne zmienne oddzielasz & czyli index.php?zmienna_1=wartosc&zmienna_2=wartosc&zmienna_3=wartosc
Go to the top of the page
+Quote Post
Gaw3l
post 18.07.2010, 16:45:23
Post #3





Grupa: Zarejestrowani
Postów: 13
Pomógł: 0
Dołączył: 14.02.2010

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


No tak, ale jak dokładnie to zrobić ;/
Próbowałem już różnie modyfikować te dwie linijki ...
  1. <form action="?action=register" method="post">

  1. if($_REQUEST['action']=="register")

Ale coś mi nie wychodzi sadsmiley02.gif
Go to the top of the page
+Quote Post
thomson89
post 18.07.2010, 16:47:53
Post #4





Grupa: Zarejestrowani
Postów: 1 178
Pomógł: 51
Dołączył: 7.01.2009
Skąd: Gdańsk

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


Radzę zmienić kod, na tablicę switch.

  1. if(empty($_GET['page']) or $_GET['page']=="index"){
  2. include("pages/index.php");
  3. }
  4.  
  5. if($_GET['page']=="strona2"){
  6. include("pages/strona2.php");
  7. }
  8.  
  9. if($_GET['page']=="strona3"){
  10. include("pages/strona3.php");
  11. }

  1. switch($_GET['page'])
  2. {
  3. case 'strona2':
  4. include('pages/strona2.php');
  5. break;
  6.  
  7. //....
  8.  
  9. default:
  10. include('pages/index.php');
  11. }


Ten post edytował thomson89 18.07.2010, 16:48:03


--------------------
Sklep 70%
Go to the top of the page
+Quote Post
Gaw3l
post 18.07.2010, 17:03:55
Post #5





Grupa: Zarejestrowani
Postów: 13
Pomógł: 0
Dołączył: 14.02.2010

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


Zmieniłem na tablicę switch, no ale mój formularz z postu No. 1 nadal nie działa :|

@Edit.>
Udało się wreszcie smile.gif

Ten post edytował Gaw3l 18.07.2010, 17:21:42
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: 15.07.2025 - 14:45