Possible error accepting variables
Posted: Wed Mar 30, 2011 2:38 pm
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?
Code: Select all
<?php
if (($_POST['c1'] == "") || ($_POST['c2'] == "") || ($_POST['c3'] == "") || ($_POST['c4'] == "") || ($_POST['c5'] == "") || ($_POST['c6'] == "") || ($_POST['c7'] == "") || ($_POST['l1'] == "") || ($_POST['l2'] == "") || ($_POST['l3'] == "") || ($_POST['l4'] == "") || ($_POST['l5'] == "") || ($_POST['a1'] == "") || ($_POST['a2'] == "") || ($_POST['a3'] == "") || ($_POST['a4'] == "") || ($_POST['a5'] == "") || ($_POST['r1'] == "") || ($_POST['r2'] == "") || ($_POST['r3'] == "") || ($_POST['r4'] == "") || ($_POST['le1'] == "") || ($_POST['le2'] == "") || ($_POST['le3'] == "") || ($_POST['le4'] == "") || ($_POST['ct1'] == "") || ($_POST['ct2'] == "") || ($_POST['ct3'] == "") || ($_POST['ct4'] == "") || ($_POST['ct5'] == "") || ($_POST['ct6'] == "") || ($_POST['ct7'] == "") || ($_POST['ls1'] == "") || ($_POST['ls2'] == "") || ($_POST['ls3'] == "") || ($_POST['ls4'] == "") || ($_POST['ac1'] == "") || ($_POST['ac2'] == "") || ($_POST['ac3'] == "") || ($_POST['ac4'] == "")) {
?>
<p>Please answer all the questions before submitting. Return to the module, answer the questions you missed, and re-submit. Thank you.</p><br /><br /></div>
<?php
} else {
//a bunch more code utilizing the $_POST variables...