I have a very important form that i have to have finished by the end of this week. I am using components from Flash 8 to create the form and can trace all the fields by their given var but it will not send the variables to the MySQL database?
I have checked the varialbes, but it’s still not working?
<?php
// saving script
// connect to the server
mysql_connect( 'localhost', 'xxxxxx', 'xxxxxx' )
or die( "Error! Could not connect to database: " . mysql_error() );
// select the database
mysql_select_db( 'yea_users' )
or die( "Error! Could not select the database: " . mysql_error() );
// get the variables from the URL request string
$ID = $_REQUEST['ID'];
$fullName = $_REQUEST['fullName'];
$companyName = $_REQUEST['companyName'];
$userName = $_REQUEST['userName'];
$password = $_REQUEST['password'];
$email = $_REQUEST['email'];
$address_1 = $_REQUEST['address_1'];
$address_2 = $_REQUEST['address_2'];
$city = $_REQUEST['city'];
$state = $_REQUEST['state_cb'];
$zip = $_REQUEST['zip'];
$phone = $_REQUEST['phone'];
$aboutCompany = $_REQUEST['aboutCompany'];
$college = $_REQUEST['college'];
$graduated = $_REQUEST['graduated'];
$gradDate = $_REQUEST['gradDate'];
$major = $_REQUEST['major'];
$minor = $_REQUEST['minor'];
$start_up = $_REQUEST['start_up_problems'];
$business_plan = $_REQUEST['business_plan'];
$buying_a_business = $_REQUEST['buying_a_business'];
$zoning = $_REQUEST['zoning'];
$selling = $_REQUEST['selling'];
$pricing = $_REQUEST['pricing'];
$marketing = $_REQUEST['marketing'];
$financing = $_REQUEST['financing'];
$patents = $_REQUEST['patents'];
$import_export = $_REQUEST['import_export'];
$website = $_REQUEST['website'];
$legal = $_REQUEST['legal_issues'];
$productDevelopment = $_REQUEST['productDevelopment'];
$accounting = $_REQUEST['accounting'];
// if $id is not defined, we have a new entry, otherwise update the old entry
if( $ID )
{
$query = "UPDATE `yea_Users` SET `fullName`='$fullName', `companyName`='$companyName', `userName`='$userName', `password`='$password', `email`='$email', `address_1`='$address_1', `address_2`='$address_2', `city`='$city', `state`='state', `zip`='$zip', `phone`='$phone', `aboutCompany`='$aboutCompany', `college`='$college', `graduated`='$graduated', `gradDate`='$gradDate', `major`='$major', `minor`='$minor', `start_up_problems`='$start_up', `business_plan`='$business_plan' WHERE `ID`='$ID'";
}
else
{
$query = "INSERT INTO `yea_Users` ( `fullName`,`companyName`, `userName`, `password`, `email`, `address_1`, `address_2`, `city`, `start_cb`, `zip`, `phone`, `aboutCompany`, `college`, `graduated`, `gradDate`, `major`, `minor`, `start_up_problems`, `business_plan`,`buying_a_business`,`zoning`,`selling`,`pricing`,`marketing`,`financing`,`patents`,`import_export`,`website`,`legal_issues`,`productDevelopment`,`accounting` )
VALUES ( '$fullName','$companyName','$userName', '$password','$email','$address_1','$address_2','$city','$state','$zip','$phone','$aboutCompany','$college','$gradutated','$gradDate','$major','$minor','$start_up','$business_plan','$zoning','$selling','$pricing','$marketing','$financing','$patents','$import_export','$website','$legal','$productDevelopment','$accounting')";
}
// save the info to the database
$results = mysql_query( $query );
?>
and the actionscript
submit_mc.onRelease = function() {
var fullName = fullName_txt.text;
var companyName = companyName_txt.text;
var userName = userName_txt.text;
var passWord = passWord_txt.text;
var cpassWord = cpassWord_txt.text;
var email = email_txt.text;
var address1 = address1_txt.text;
var address2 = address2_txt.text;
var city = city_txt.text;
var state_cb = statelc.getValue();
var zip = zip_txt.text;
var phone = phone_txt.text;
var company = company_txt.text;
var college = college_txt.text;
var gradYes = gradYes.getData();
var gradNo = gradNo.getData();
var graduated = gradYes, gradNo;
var gradDate = gradDate_txt.text;
var major = major_txt.text;
var minor = minor_txt.text;
var start_up_problems = start_up_problems.getFocus();
var business_plan = business_plan.getFocus();
//
//trace(fullName);
//trace(userName);
//trace(passWord);
//trace(cpassWord);
//trace(email);
//trace(address1);
//trace(address2);
//trace(city);
//trace(state_cb);
//trace(zip);
//trace(phone);
//trace(company);
//trace(college);
//trace(graduated);
//trace(gradDate);
//trace(major);
//trace(minor);
trace(business_plan.getValue());
//
////////
if (validEmail(vemail) && (!fullName.isInvalid()) && (!userName.isInvalid()) && (!comments.isInvalid())) {
loadVariablesNum("signup.php", 0, "POST");
} else {
if (fullName.isInvalid()) {
fullName = fnameErr;
}
if (userName.isInvalid()) {
lname = lnameErr;
}
if (!validEmail(vemail)) {
vemail = vemailErr;
}
if (comments.isInvalid()) {
comments = commentsErr;
}
action = "";
stop();
}
};