desithugg Posted October 4, 2007 Share Posted October 4, 2007 Well I have a swf file. I'm trying to send POST variables from the flash movie to a page and I want that page to open up in a new window. I'm trying to do a test first just to find out how it works. Actionscript: on(press){ send_lv = new LoadVars(); send_lv.say = "asdadsads"; send_lv.send("http://pn-network.net/rectanle.php","_BLANK","POST"); } PHP: <? echo $_POST['say']; ?> Now everything works fine except the variables are being sent as GET and not POST. So when I click on the button the window that opens up is "http://pn-network.net/rectanle.php?say=asdadsads". I don't want the variables to appear in the URL I want them to be passed using the POST method. I've been trying for two days. I've tried getURL and everything I could find but no luck. Any help is greatly appreciated, thanks. Quote Link to comment https://forums.phpfreaks.com/topic/71872-flashphpsending-post-variables/ Share on other sites More sharing options...
RichardRotterdam Posted October 12, 2007 Share Posted October 12, 2007 I have an alternative for you. Basicly you want a clean URL so you could use javascript to achieve this. Flash is able to call a javascript function within that page. Here is what you can do. in your swf file getURL("javascript:setVar('some value inserted from flash')"); on you parent page with flash(call the function setVar in flash) <script> var parentVar; //cal this function from flash function setVar(value){ parentVar=value; } </script> your _blank page <script> var parentVar=window.opener.parentVar; document.write(parentVar); </script> Quote Link to comment https://forums.phpfreaks.com/topic/71872-flashphpsending-post-variables/#findComment-367708 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.