PHP redirect
От: Аноним  
Дата: 02.02.03 22:29
Оценка:
Как можно при редиректе передать, как при ПОСТ запросе, переменные? Не через кукис!

$aVar1;
$aVar2;
$aVae3;
...
header("Location: some.phtml");
Re: PHP redirect
От: Аноним  
Дата: 02.02.03 23:02
Оценка:
header("Location: some.phtml?aVar1=$aVar1&aVar2=$aVar2&aVae3=$aVae3");
Re[2]: PHP redirect
От: Аноним  
Дата: 02.02.03 23:05
Оценка:
header("Location: some.phtml?aVar1=$aVar1&aVar2=$aVar2&aVae3=$aVae3");
Сори не это не POST, POST надо вспоминать
Re[2]: PHP redirect
От: Аноним  
Дата: 02.02.03 23:23
Оценка:
header("Location: some.phtml?aVar1=$aVar1&aVar2=$aVar2&aVae3=$aVae3");
Сори маленько не то . Про POST можно прочитать здесь. Подобная проблема здесь обсуждалась.
Re: PHP redirect
От: Lexey Россия  
Дата: 03.02.03 08:19
Оценка:
Здравствуйте, Аноним, Вы писали:

А>Как можно при редиректе передать, как при ПОСТ запросе, переменные? Не через кукис!


А>$aVar1;

А>$aVar2;
А>$aVae3;
А>...
А>header("Location: some.phtml");

Никак. Выдержка из RFC 2616:

If the 302 status code is received in response to a request other
than GET or HEAD, the user agent MUST NOT automatically redirect the
request unless it can be confirmed by the user, since this might
change the conditions under which the request was issued.

Note: RFC 1945 and RFC 2068 specify that the client is not allowed
to change the method on the redirected request. However, most
existing user agent implementations treat 302 as if it were a 303
response, performing a GET on the Location field-value regardless
of the original request method. The status codes 303 and 307 have
been added for servers that wish to make unambiguously clear which
kind of reaction is expected of the client.
"Будь достоин победы" (c) 8th Wizard's rule.
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.