It's an internal site so I'm not too concerned but for best practices, I'll be reading up on it soon.
Well, to make this simple, I'll try to document it in full.
$Faxnumber=$_POST['faxnumber'];
$Comments=$_POST['comments'];
[b]$Headquarters=$_POST['headquarters'];[/b]
// Insert data into mysql
$sql="INSERT INTO supplier_data(company, city, state, country, address1, address2, zip, division, yearestablished, homepage, qaemployees, numberofemployees,
mainnumber, contactname, telephone, mobile, contactposition, emailaddy, faxnumber, comments, [b]headquarters[/b])VALUES('$Company', '$City', '$State', '$Country',
'$Address1',
'$Address2', '$Zip', '$Division', '$YearEstablished', '$Homepage', '$Qaemployees', '$Numberofemployees', '$Mainnumber', '$Contactname', '$Telephone',
'$Mobile', '$Contactposition', '$Emailaddy', '$Faxnumber', '$Comments', [b]'$Headquarters'[/b])";
When I add $headquarters back into my first insert statement, I get the following error:
INSERT INTO supplier_data(company, city, state, country, address1, address2, zip, division, yearestablished, homepage, qaemployees, numberofemployees, mainnumber, contactname, telephone, mobile, contactposition, emailaddy, faxnumber, comments, headquarters)VALUES('Test', '', '', '', '', '', '', '', '', 'http://', 'unk', 'unk', '', '', '', '', '', '', '', '', 'Array')ERROR
On the form page, headquarters has a value of "headquarters[]." If I change the value to just simply "headquarters," I get:
INSERT INTO supplier_data(company, city, state, country, address1, address2, zip, division, yearestablished, homepage, qaemployees, numberofemployees, mainnumber, contactname, telephone, mobile, contactposition, emailaddy, faxnumber, comments, headquarters)VALUES('w', '', '', '', '', '', '', '', '', 'http://', 'unk', 'unk', '', '', '', '', '', '', '', '', '')ERROR