Post
#1
|
|
|
Grupa: Zarejestrowani Postów: 18 Pomógł: 0 Dołączył: 29.08.2004 Ostrzeżenie: (0%)
|
Prosze o pomoc! Zarejestrowałem się na dhost.info i otrzymałem konto, ale mam problem bo nie moge wysyłać zminnych ani przez link, ani przez formularz. Na stronie w FAQ znalazłem coś takiego, ale nie moge sobie poradzić:
Cytat Question: php variables don't get sent to pages? Answer: DHOST doesn't support global variables, thus you must include POST (aka HTTP_POST_VARS) or GET (aka HTTP_GET_VARS) on variables that are passed to other scripts. $_POST['variable'] - Variables that are directly sent to same/other script. $_GET['variable'] - Variables passed over the URL. (i.e. script.php?action=go) If you don't want to have the hassle of adding POST or GET to all of your variables...add this to the very top of your php script: CODE extract($_POST); extract($_GET); That code turns $_POST['variable'] and $_GET['variable'] into $variable. Napisałem prubny bardzo prosty skrypt: formularz html który ma wysyłać zmienną x: Cytat <html> <form method="post" action="1.php"> <input type="text" name="x"> <input type="submit"> </form> </html> A ty plik php który ma tą zmienną otrzymywać: Cytat <? echo"$x"; ?> Byłbym wdzięczny gdyby ktoś napisał mi jak zmodyfikować oba te pliki według tego co napisali na dhoście by działało i przesyłanie zmiennych przy użyciu linka i formularza. Pozdrawiam |
|
|
|
Saladin Problem na dhost.info z wysyłaniem zmiennych 11.02.2005, 11:02:29
Vertical [PHP] pobierz, plaintext <?echo $_POST['x'... 11.02.2005, 11:04:08
LukasMG By było elegancko :-)
[PHP] pobierz, plaintext ... 11.02.2005, 12:51:18
kszychu CytatIf you don't want to have the hassle of a... 11.02.2005, 12:57:38
Saladin Dzięki powinno działać 11.02.2005, 13:43:33
blokern nie chce zakladac nowego watka a na ten trafilem j... 27.02.2008, 17:07:51 ![]() ![]() |
|
Aktualny czas: 24.12.2025 - 18:00 |