Форум Flasher.ru

Форум Flasher.ru (http://www.flasher.ru/forum/index.php)
-   Серверные технологии и Flash (http://www.flasher.ru/forum/forumdisplay.php?f=62)
-   -   Как в PHP принять POST переменную? (http://www.flasher.ru/forum/showthread.php?t=142233)

Tr1te 15.07.2010 22:59

Как в PHP принять POST переменную?
 
Я через POST запрос отправляю на сервер переменную которую задаю с помощью URLVariables, как мне на сервере(PHP) Получить ее?

По идеи так:
PHP код:

$test=$_POST['temp']; 

Ниже, то как я ее отправляю.
Код AS3:

                public function SendRequest(SR_Method:int) {
                        var RequestVars:URLVariables=new URLVariables  ;
 
                        RequestVars.temp="test";
 
                        var URLReq:URLRequest=new URLRequest(Server);
                        URLReq.method=URLRequestMethod.POST;
                        URLReq.data=RequestVars;
 
                        var RequestLoader:URLLoader=new URLLoader(URLReq);
                        RequestLoader.addEventListener("complete",xmlLoader);
 
                        function xmlLoader(e:Event):void {
                                RequestLoader.removeEventListener("complete",xmlLoader);
 
                                ResponseXML=XML(e.currentTarget.data);
                                trace(ResponseXML);
                                //parent.dispatchEvent(new Event("Request_Complete"));
                        }
 
                }


Сайлас 15.07.2010 23:16

Так и получать, через $_POST, ищите проблему при отправке скорее всего.


Часовой пояс GMT +4, время: 22:14.

Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.