Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

2 Stron V   1 2 >  
Reply to this topicStart new topic
> [PHP]POST w linku
antenes
post
Post #1





Grupa: Zarejestrowani
Postów: 10
Pomógł: 0
Dołączył: 13.01.2013

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


Witam,

mam zapytanie dotyczące linków w php.

mam link <a href="index.php?plik=06&lang='.$lang.'&wybor=23"> i chciałbym te zmienne schować żeby po kliknięciu nie były pokazane w pasku adresu. Czy jest jakaś możliwość (IMG:style_emoticons/default/questionmark.gif)

Pomóżcie proszę bardzo.
Go to the top of the page
+Quote Post
mmmmmmm
post
Post #2





Grupa: Zarejestrowani
Postów: 1 421
Pomógł: 310
Dołączył: 18.04.2012

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


<form method="POST" action="index.php">
<input type="hidden" name="plik" value="06" />
<input type="hidden" name="lang" value="$lang" />
<input type="hidden" name="wybor=23" value="06" />
</form>
Pewnie ktores z tym nie bedzie hidden
Go to the top of the page
+Quote Post
com
post
Post #3





Grupa: Zarejestrowani
Postów: 3 034
Pomógł: 366
Dołączył: 24.05.2012

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


@up
chyba nie zrozumiałeś oco chodzi koledze (IMG:style_emoticons/default/wink.gif)


polecam mod_rewrite (IMG:style_emoticons/default/wink.gif)
Go to the top of the page
+Quote Post
antenes
post
Post #4





Grupa: Zarejestrowani
Postów: 10
Pomógł: 0
Dołączył: 13.01.2013

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


a podpowiedziałbyś mi jak użyć mod_rewrite w tym przypadku (IMG:style_emoticons/default/questionmark.gif)

troszke czytalem o tym ale jakos sobie nie moge poradzic (IMG:style_emoticons/default/sad.gif)
Go to the top of the page
+Quote Post
com
post
Post #5





Grupa: Zarejestrowani
Postów: 3 034
Pomógł: 366
Dołączył: 24.05.2012

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


  1. .htaccess
  2. Options FollowSymLinks
  3. RewriteEngine On
  4. RewriteRule ^jakasnazwa.html$ index.php?plik=$1&lang=$2&wybor=$3 [L]
Go to the top of the page
+Quote Post
antenes
post
Post #6





Grupa: Zarejestrowani
Postów: 10
Pomógł: 0
Dołączył: 13.01.2013

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


oki a w takim razie na pewno zmieni sie sam link napisalbys mi jeszcze jak on ma wygladać (IMG:style_emoticons/default/questionmark.gif) i czy pliki od 01 do 09 moga byc w tym samym katalogu np files (IMG:style_emoticons/default/questionmark.gif)

Będę Ci bardzo wdzięczny (IMG:style_emoticons/default/smile.gif)

Ten post edytował antenes 18.01.2013, 00:14:58
Go to the top of the page
+Quote Post
com
post
Post #7





Grupa: Zarejestrowani
Postów: 3 034
Pomógł: 366
Dołączył: 24.05.2012

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


mały edit do tej regułki
  1. .htaccess
  2. Options FollowSymLinks
  3. RewriteEngine On
  4. RewriteRule ^plik-([^-]+)-([^-]+)-([^-]+).html$ index.php?plik=$1&lang=$2&wybor=$3 [L]


i wtedy link budujesz poprzez np strona.pl/plik-06-pl-23.html to jest oczywiscie przykład mozesz w regulce zmienić plik-([^-]+)-([^-]+)-([^-]+).html na cos innego (IMG:style_emoticons/default/smile.gif) a drugiego pytania nie rozumiem (IMG:style_emoticons/default/biggrin.gif)

Ten post edytował com 18.01.2013, 00:34:41
Go to the top of the page
+Quote Post
antenes
post
Post #8





Grupa: Zarejestrowani
Postów: 10
Pomógł: 0
Dołączył: 13.01.2013

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


wpisałem tak; <a href="index.php?plik-06-pl.html"> chyba zle bo wywalilo mnie na strone glowna (IMG:style_emoticons/default/sad.gif)
Go to the top of the page
+Quote Post
com
post
Post #9





Grupa: Zarejestrowani
Postów: 3 034
Pomógł: 366
Dołączył: 24.05.2012

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


a zmieniłeś w regułce w pliku htaccess ? z plik-([^-]+)-([^-]+)-([^-]+).html na plik-([^-]+)-([^-]+).html ?
Go to the top of the page
+Quote Post
antenes
post
Post #10





Grupa: Zarejestrowani
Postów: 10
Pomógł: 0
Dołączył: 13.01.2013

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


zmienilem (IMG:style_emoticons/default/sad.gif) teraz tak wyglada

.htaccess
Options FollowSymLinks
RewriteEngine On
RewriteRule ^plik-([^-]+)-([^-]+).html$ index.php?plik=$1&lang=$2 [L]

Ten post edytował antenes 18.01.2013, 00:45:01
Go to the top of the page
+Quote Post
com
post
Post #11





Grupa: Zarejestrowani
Postów: 3 034
Pomógł: 366
Dołączył: 24.05.2012

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


a <a href="index.php?plik=06&lang='.$lang.'&wybor=23"> otwiera sie poprawnie?

po pierwsze to usuń linijke .htaccess bo to jest nazwa pliku gdzie masz to wrzucić, wiem źle to wkleiłem (IMG:style_emoticons/default/wink.gif) jak nie masz tego pliku to w katalogu głownym tworzysz ten plik i wklejasz :
Options FollowSymLinks
RewriteEngine On
RewriteRule ^plik-([^-]+)-([^-]+)-([^-]+).html$ index.php?plik=$1&lang=$2&wybor=$3 [L]

Ten post edytował com 18.01.2013, 00:47:05
Go to the top of the page
+Quote Post
antenes
post
Post #12





Grupa: Zarejestrowani
Postów: 10
Pomógł: 0
Dołączył: 13.01.2013

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


Tak otwiera poprawnie (IMG:style_emoticons/default/sad.gif)

Tak mam zrobione bez tej linijki .htaccess

plik .htaccess wygląda teraz tak:

Options FollowSymLinks
RewriteEngine On
RewriteRule ^plik-([^-]+)-([^-]+).html$ index.php?plik=$1&lang=$2 [L]

a index.php
.
.
.
<a href="index.php?plik-06-pl.html">
.
.
.
Go to the top of the page
+Quote Post
com
post
Post #13





Grupa: Zarejestrowani
Postów: 3 034
Pomógł: 366
Dołączył: 24.05.2012

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


a co przekazuje zmienna $lang bo może jest tam inna formuła (IMG:style_emoticons/default/wink.gif)
Go to the top of the page
+Quote Post
antenes
post
Post #14





Grupa: Zarejestrowani
Postów: 10
Pomógł: 0
Dołączył: 13.01.2013

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


w pasku adresu mam : http://www.sztabowsiakowka.pl/index.php?plik-06-pl.html
Go to the top of the page
+Quote Post
com
post
Post #15





Grupa: Zarejestrowani
Postów: 3 034
Pomógł: 366
Dołączył: 24.05.2012

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


bo link ma wygl tak http://www.sztabowsiakowka.pl/plik-06-pl.html (IMG:style_emoticons/default/wink.gif)

nie zauważyłem wcześniej tego błedu, w linku (IMG:style_emoticons/default/biggrin.gif)

Ten post edytował com 18.01.2013, 01:05:20
Go to the top of the page
+Quote Post
antenes
post
Post #16





Grupa: Zarejestrowani
Postów: 10
Pomógł: 0
Dołączył: 13.01.2013

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


JESTES WIELKI (IMG:style_emoticons/default/exclamation.gif) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


DZIAŁA DZIAŁA DZIAŁA to mam rozumiec ze tak mam do kazdego linku zrobic tak (IMG:style_emoticons/default/questionmark.gif)
Go to the top of the page
+Quote Post
com
post
Post #17





Grupa: Zarejestrowani
Postów: 3 034
Pomógł: 366
Dołączył: 24.05.2012

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


no tak tylko zmienasz tam parametr pierwszy no i jezyk dla niemieckiego to w linkach dasz de (IMG:style_emoticons/default/wink.gif)
Go to the top of the page
+Quote Post
antenes
post
Post #18





Grupa: Zarejestrowani
Postów: 10
Pomógł: 0
Dołączył: 13.01.2013

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


jestes jeszcze (IMG:style_emoticons/default/questionmark.gif)

a jak mam zrobic w przypadku kiedy do zmiennej wyciągam dane z bazy np: index.php?plik=17&lang='.$lang.'&view=album&id_album='.$rekord_0[0].' gdzie album jest wyciagany z bazy ?
Go to the top of the page
+Quote Post
com
post
Post #19





Grupa: Zarejestrowani
Postów: 3 034
Pomógł: 366
Dołączył: 24.05.2012

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


czyli link teraz wygl np tak http://www.sztabowsiakowka.pl/index.php?pl...&id_album=1 rozumiem ? jesli tak to dajesz regułke taka :

  1. RewriteRule ^plik-([^-]+)-([^-]+)-album-([^-]+).html$ index.php?plik=$1&lang=$2&view=album&id_album=$3 [L]


Ten post edytował com 18.01.2013, 01:23:55
Go to the top of the page
+Quote Post
antenes
post
Post #20





Grupa: Zarejestrowani
Postów: 10
Pomógł: 0
Dołączył: 13.01.2013

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


juz czaje zrobilem maly blad ale go juz rozwiazalem (IMG:style_emoticons/default/smile.gif) Wielkie dzieki jeszcze raz gdybym mial kiedys problem odezwe sie do Ciebie co (IMG:style_emoticons/default/questionmark.gif)
Go to the top of the page
+Quote Post
com
post
Post #21





Grupa: Zarejestrowani
Postów: 3 034
Pomógł: 366
Dołączył: 24.05.2012

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


ok nie ma problemu (IMG:style_emoticons/default/wink.gif)
Go to the top of the page
+Quote Post

2 Stron V   1 2 >
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.12.2025 - 06:56