Hi,
I have a file that takes a variable from the user then prints something, let say
$something = $_GET['something'];
echo $something;
It works perfectly fine with GET, however, if you change this to post it stops working. I am sending the request from a flex client to the PHP code, and I am using a get request when I am using get in php and a post request from flex when I am using a post request in PHP. Is there a way to know why POST is not working?
The post request I used from flex:
var variables:URLVariables = new URLVariables("username=" + username + "&password=" + password);
var request:URLRequest = new URLRequest();
request.url = proxy + "authenticate.php";
request.method = URLRequestMethod.POST;
request.data = variables;
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, authenticateUserHandler);
try {
loader.load(request);
}
catch (error:Error) {
Alert.show("Unable to load URL");
}
(Note, I use the same thing for GET except I change the .POST to .GET)
Please feel free to ask me for any additional details or information.