$oCustomer->userID;
$oSubmitForm = new Form();
if (isset($_POST["submit"])) {
    $oSubmitForm->data = $_POST;
    $oSubmitForm->files = $_FILES;
    //form validation
    $oSubmitForm->checkFilled("recipeTitle");
    $oSubmitForm->checkFilled("authorNotes");
    $oSubmitForm->checkFilled("ingredients");
    $oSubmitForm->checkFilled("directions");
    $oSubmitForm->checkFileUpload("imageUpload");
    if ($oSubmitForm->valid == true) {
        $oRecipe = new Recipe();
        //save details:
        $sImageName = "recipeImage-" . date("Y-m-d-H-i-s") . ".jpg";
        $oSubmitForm->moveFile("imageUpload", $sImageName);
        $oRecipe->title = $_POST["recipeTitle"];
        $oRecipe->authorNotes = $_POST["authorNotes"];
        $oRecipe->ingredients = $_POST["ingredients"];
        $oRecipe->directions = $_POST["directions"];
        $oRecipe->imagePath = $sImageName;
        $oRecipe->userID = $oCustomer->userID;
        $oRecipe->recipeTypeID = $_POST["recipeCategory"];
        $oRecipe->save();
        header("Location: submitRecipe.php?message=submitted");
        exit;
    }
}
//html markup:
$oSubmitForm->makeInput("recipeTitle", "Recipe Title *", "eight columns floatLeft marginBottom10");
$oSubmitForm->makeSelect("recipeCategory", "Recipe Category *", RecipeTypeManager::listAllTypes(), "eight columns floatLeft marginBottom10");
$oProductForm = new Form();
if (isset($_POST["add"])) {
    $oProductForm->data = $_POST;
    $oProductForm->files = $_FILES;
    $oProductForm->checkFilled("productName");
    $oProductForm->checkFilled("productDescription");
    $oProductForm->checkFileUpload("imageUpload");
    $oProductForm->checkFilled("productSize");
    $oProductForm->checkFilled("productPrice");
    $oProductForm->checkFilled("ingredients");
    $oProductForm->checkFilled("stockLevel");
    if ($oProductForm->valid == true) {
        $oProduct = new Product();
        //save details:
        $sImageName = "productImage-" . date("Y-m-d-H-i-s") . ".jpg";
        $oProductForm->moveFile("imageUpload", $sImageName);
        $oProduct->productName = $_POST["productName"];
        $oProduct->description = $_POST["productDescription"];
        $oProduct->imagePath = $sImageName;
        $oProduct->size = $_POST["productSize"];
        $oProduct->price = $_POST["productPrice"];
        $oProduct->ingredients = $_POST["ingredients"];
        $oProduct->stockLevel = $_POST["stockLevel"];
        $oProduct->save();
        header("Location: addProduct.php?message=added");
        exit;
    }
}
//html markup
$oProductForm->makeInput("productName", "Product Name *", "eight columns floatLeft marginBottom10");
$oProductForm->makeInput("productDescription", "Product Description *", "eight columns floatLeft marginBottom10");