I’m making a quiz game where I need to send information about the player’s score and other variables from Flash to a PHP page whlie opening the PHP page in a browser. I want to use POST so the variables don’t show in the address line of the browser.
My code looks like:
highScoreEntryPath = ("register.php");
highScoreEntryRequest = new URLRequest(highScoreEntryPath);
highScoreEntryRequest.data = setHighScoreStats;
highScoreEntryRequest.method = URLRequestMethod.POST
highScoreEntryLoader = new URLLoader();
highScoreEntryLoader.dataFormat = "VARIABLES";
highScoreEntryLoader.load(highScoreEntryRequest);
navigateToURL(highScoreEntryRequest, "blank");
When I get to the point where this code is executed, Flash opens a new browser window and queries the right php page, but appends the variables to the URL as if I was using GET!
I’ve also tried setting the method like this instead:
highScoreEntryRequest.method = "POST"
but that doesn’t work either. What am I doing wrong?? If it’s not possible to use navigateToURL like this, how else can I open a page in a browser and send variables along by POST?