We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now

x

IE7 not showing $_POST values using LoadVars in Action Script 2

eppyfone
eppyfone asked
on
Medium Priority
353 Views
Last Modified: 2012-05-06
Hi
I need to pass some information between ActionScript 2 and PHP so I'm using the LoadVars and send methods in ActionScript as follows...

var oEnvelope:LoadVars = new LoadVars();
oEnvelope.Variable1 = 1;
oEnvelope.Variable2 = 0;
oEnvelope.send( 'mypage.php', 'newwin', 'POST' );

My mypage.php file contains the following...

<?php

  $Variable1 = $_POST['Variable1'];
  $Variable2 = $_POST['Variable2'];
 
  echo "Variable1 : $Variable1" ;
  echo "<br/>";
  echo "Variable2 : $Variable2" ;

?>

Now all works well in FF3 and Safari, however although IE7 shows the page .. it is not showing any values from the $_POST super global!

Doesn't seem to be a caching issue as it has been tried on a machine which has had no exposure to the site in question and the results are the same, i.e. not working.

Running on Apache 1.3 ( yes I have requested an upgrade to 2 ), and PHP-5.

Any comments appreciated, thanks.
Comment
Watch Question

you are running the flash and the script on the same domain?
can be a security issue in IE...

Author

Commented:
Hi ..
Yes they are both under the same domain.
E.
try to put a write to a log file in your script, to find out, if it is accessed, or not - put  file_put_contents('log.txt', '1'); to your mypage.php (be sure that permissions to create file are set correctly)


Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Ionut A. TudorPHP Programmer
CERTIFIED EXPERT
Commented:
put this in mypage.php :
<?php
print_r($_POST);
?>
 
Do you see the parameters Variable1 & Variable2 in the result array ? If not then this is not a php problem and you should ask this question in an appropiate EE category like ActionScript where is a better chance to find the answer. Good luck

Author

Commented:
ludo - The php script is being called, thanks.
al3c - the $_POST is empty in IE, not in FF / Safari, thanks.
I'm still investigating.
e

Author

Commented:
SOLUTION
Because the initial call from the Flash movie was on a page within a frameset ......
IE couldn't cope although FF and Safari could.
Points split for your speedy responses ..
Thanks
E.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.