Flash FLA and php files for mysql db

The mysql database & table are created
(I’ve just starting teaching myself php.)
I’ve uploaded the FLA (homeInfo.fla) which shows what I’m trying to do.
Am I even close?

THIS IS MY homeInfo.php file:
<?

//check for required fields
if (!isset($firstNameHome) || !isset($lastNameHome) || !isset($emailHome) || (!isset($websiteHome) || !isset($referredByHome) || !isset($addressHome) || (!isset($cityHome) || !isset($stateHome) || !isset($zipHome) || empty($countryHome) || (!isset($landLineHome) || !isset($cellHome) || !isset($faxHome) || (!isset($and1Home) || !isset($and2Home) || !isset($and3Home) || empty($firstNameHome) || empty($lastNameHome) || empty($emailHome) || empty($websiteHome) || empty($referredByHome) || empty($addressHome) || empty($cityHome) || empty($stateHome) || empty($zipHome) || empty($countryHome) || empty($landLineHome) || empty($cellHome) || empty($faxHome) || empty($and1Home) || empty($and2Home) || empty($and3Home)) {
print “&result=Fail”;
print “&errorMsg=” . urlencode(“sorry - all fields must be filled out - please try again”);
exit;
}

//set up database and table name
$db_name = “";
$table_name = "
*”;

//connect to MySQL and select database to use
$connection = @mysql_connect (“", "*”, “***********”) or die(mysql_error());

$db = @mysql_select_db ($db_name, $connection) or die(mysql_error());

//create SQL statement and issue query
$sql = “INSERT INTO $table_name (firstNameHome, lastNameHome, emailHome, websiteHome, referredByHome, addressHome, cityHome, stateHome, zipHome, countryHome, landLineHome, cellHome, faxHome, and1Home, and2Home, and3Home) VALUES (’$_POST[SelecteesHomeID’, ‘$_POST[firstNameHome’, ‘$_POST[lastNameHome’, ‘$_POST[emailHome’, ‘$_POST[websiteHome’, ‘$_POST[referredByHome’, ‘$_POST[addressHome’, ‘$_POST[cityHome’, ‘$_POST[stateHome’, ‘$_POST[zipHome’, ‘$_POST[countryHome’, ‘$_POST[landLineHome’, ‘$_POST[cellHome’, ‘$_POST[faxHome’, ‘$_POST[and1Home’, ‘$_POST[and2Home’, ‘$_POST[and3Home’)”;

$result = @mysql_query ($sql,$connection) or die (mysql_error());

?>

THIS IS MY hIentry.php:
&result=okay&entries=

The FLA file (homeInfo.fla)

use the attahcments feature when you post a message to attach a file.

I must have used use the attachment feature incorrectly - my mistake - will try again.