PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Output page in PHP not working when variables sent to it from Flash module. I have a PHP script that processes and spits out a bunch of text for users when they click a submit button in a Flash SWF file. I setup a test form that sends the variables to the PHP file and it outputs correctly, but when I try and submit it from flash the php file doesn't even load...although both the SWF and the php file are on the same directory on the server. I'm thinking this is an error in my actionscript code, or a security issue on the server, but I wanted to get your guys opinions on my php code first. Is it correct to accept the variables from Flash using the following test?
Well, if an HTML form works OK then that would point to your SWF
What I would do is alter your PHP code to save all the raw input request data to a file.
Run the script with the form and then run it with you Flash and compare the input
If it's a security issue then you will not get the second file created!
If it's bad data (IN EITHER THE FORM OR SWF!) you should be able to debug by comparing the input
Then if that's OK check your SWF is handling the returned data OK
Awesome, that totally worked! Both the test form and my flash file created the vars.txt file I wanted..now i just need to figure out how to get flash to actually send the user to that php file so they can see their results; right now it sends the variables to php but it looks to the user like they are just sitting uselessly on the flash page :p