Here is the code I am using for the import
I keep getting this error and am not sure what is causing it.
Error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '','subdiv','2','1.5','1.5','Unfinished','Yes','Yes','3/4 - 1 Ac
near as I can tell this chunk of posted data starts at '$subdiv','$NumberOfBedrooms' etc....
Anyone have an Idea what I am doing wrong?
Thanks
<?php
/********************************************
* Take information from form.php and
* insert it into a database.
********************************************/
require_once("connections/database.php");
mysql_select_db($database, $dbconn);
$fName=$_POST['fName']; //textfield
$lName=$_POST['lName'] //textfield
$email=$_POST['email']; //textfield
$hmPhone=$_POST['hmPhone']; //textfield
$wkPhone=$_POST['wkPhone']; //textfield
$cellPhone=$_POST['cellPhone']; //textfield
$address1=$_POST['address1']; //textfield
$city=$_POST['city']; //textfield
$state=$_POST['state']; //dropdown menu
$zip=$_POST['zip']; //textfield
$county=$_POST['county']; //textfield
$subdiv=$_POST['subDiv']; //textfield
$NumberOfBedrooms=$_POST['NumberOfBedrooms']; //dropdown menu
$SquareFootage=$_POST['NumberOfBathrooms']; //dropdown menu
$Basement=$_POST['Basement']; //dropdown menu
$Carport=$_POST['Carport']; //dropdown menu
$LotSize=$_POST['LotSize'];//dropdown menu
$Stories=$_POST['Stories']; //dropdown menu
$AgeOfHome=$_POST['AgeOfHome']; //dropdown menu
$IsHomeOccupied=$_POST['IsHomeOccupied']; //dropdown menu
$monthlyMort=$_POST['monthlyMort']; //textfield
$estValue=$_POST['estValue']; //textfield
$estRepairs=$_POST['estRepairs']; //textfield
$firstPayoff=$_POST['firstPayoff'];//textfield
$secondPayoff=$_POST['secondPayoff'];//textfield
$CurrentOnPayments=$_POST['CurrentOnPayments']; //dropdowm menu
$amtBackPayments=$_POST['amtBackPayments']; //textfield
$reasonSell=$_POST['reasonSell']; //textarea
$UrgencyToSale=$_POST['UrgencyToSale']; //textfield
$comments=$_POST['comments']; //textarea
$HeardAboutUs=$_POST['HeardAboutUs']; //dropdowm menu
$sql ="INSERT INTO personal_information";
$sql .="(fName,lName,email,hmPhone,wkPhone,cellPhone,address1,city,state,zip,county,";
$sql .="subdiv,bedrooms,bathrooms,sqFootage,basement,carport,garage,lotSize,stories,ageOfHome,isHomeOccupied,";
$sql .="isHomeListed,monthlyMortgage,estValue,estRepair,firstPayoff,secondPayoff,";
$sql .="currentOnPayments,amtBackPayments,reasonSell,urgencyToSale,comments,hearAboutUs)";
$sql .="VALUES ('$fName','$lName','$email','$hmPhone','$wkPhone','$cellPhone','$address1','$city','$state','$zip',$county',";
$sql .="'$subdiv','$NumberOfBedrooms','$NumberOfBathrooms','$SquareFootage','$Basement','$Carport','$Garage','$LotSize','$Stories','$AgeOfHome','$IsHomeOccupied',";
$sql .="'$IsHomeListed','$monthlyMort','$estValue','$estRepairs','$firstPayoff','$secondPayoff',";
$sql .="'$CurrentOnPayments','$amtBackPayments','$reasonSell','$UrgencyToSale','$comments','$HeardAboutUs')";
$result = mysql_query($sql, $dbconn)or die("<br>Error: ". mysql_error());
?>