The code looks correct. If you give me a url where I can test and FTP access I can debug it for you. You may be able to debug it yourself by adding this below the update:
if ((((isset($_POST["AddVarietyButton"]))?$_POST["AddVarietyButton"]:"") != "")) {
var_dump($InsertQuery);
die();
}
That will write information about the insert including any error messages that should lead you to what is causing the insert to fail.