I have a flash form that sends a monthly report that users fill out to a php file, which sends it to a MS SQL database. This issue I am having is that anything larger then 1300 characters entered into the flash form will not work at all. If I reduce the amount of text to 1300 characters or less, it will send it to the php and database just fine. My research shows that a flash variable should be able to handle 65,000 characters, and when I trace my output from flash to php, all of the data is being traced. however, it is not being send to php. I am using LoadVars to send the data with _GET. So is this a php issue, or a flash issue? I ran a php info page and my max_post is set to 10M that should be enough to handle this load. I am not sure why it is not working with anything larger then 1300 characters. Below is my code for my php and flash files.
The variables that are affected by this are the testEvlauation, projects, support, and programManagement variables. I need them to send at least 8000 characters a peice to the php file. Any help with this would be appreciated.
Flash Code:
on (release) {
sendData = new LoadVars();
sendData.contractor = contractor.text;
sendData.name = name.text;
sendData.contractNum = contractNum.text;
sendData.performance = performance.text;
sendData.manager = manager.text;
sendData.activity = activity.text;
sendData.taskNum = taskNum.text;
sendData.date = date.text;
sendData.testEvaluation = testEvaluation.text;
sendData.projects = projects.text;
sendData.support = support.text;
sendData.programManagement = programManagement.text;
sendData.send("Flash/php/MRform.php","_blank","GET");
trace(sendData.support);
}
PHP Code:
//MS SQL SERVER CONNECTION PERAMETERS
$serverName = "lsv-fs-jepac1\JEPAC";
$uid = "SQLLogin";
$pwd = "XXXXXXXXXXXXXXXXXXXXXX";
$connectionInfo = array("UID" => $uid, "PWD" => $pwd, "Database"=>"Requests");
/* Connect using MS SQL Credentials. */
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn ) {
echo "Connection Established.\n";
}
else {
echo "connection could not be established.\n";
die( print_r( sqlsrv_errors(), true));
}
/* Set up the parameterized query.*/
$name =$_GET['name'];
$contractor =$_GET['contractor'];
$contractnum =$_GET['contractNum'];
$performance =$_GET['performance'];
$manager =$_GET['manager'];
$activity =$_GET['activity'];
$taskNum =$_GET['taskNum'];
$date =$_GET['date'];
$testEvaluation =$_GET['testEvaluation'];
$projects =$_GET['projects'];
$support =$_GET['support'];
$programManagement =$_GET['programManagement'];
$tsql = "INSERT INTO dbo.MRSup
(Name,
Contractor,
ContractNum,
Performance,
Manager,
Activity,
TaskNum,
Date,
TestEvaluation,
Projects,
Support,
ProgramManagement)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
// Set Parapter Values.
$params = array($name, $contractor, $contractnum, $performance, $manager, $activity, $taskNum, $date, $testEvaluation, $projects, $support, $programManagement);
$stmt = sqlsrv_query( $conn, $tsql, $params);
if( $stmt ) {
echo "Row successfully inserted.\n";
}
else {
echo "Row instertion failed.\n";
die (print_r( sqlsrv_errors(), true));
}
//free statements
sqlsrv_free_stmt( $stmt);
sqlsrv_close ($conn);