Validation Results"; // validate article if (!empty($_POST['article'] ) ) { $article = $_POST['article']; $results .= "
article is $article
"; } else { $article = NULL; $results .= 'Article name missing!
'; } // validate price if (empty($_POST['price'] ) ) { $price = NULL; $results .= 'Price missing
'; } else if ( ! is_numeric($_POST['price']) ) { $results .= 'Price not numeric!
'; } else { $price = $_POST['price']; if ($price > 0) { $results .= "Price is $price
"; } else { $results .= "Price should be a positive value
"; } } // validate units if (empty($_POST['units'] ) ) { $units = NULL; $results .= 'Units missing
'; } else if (! is_numeric($_POST['units']) ) { $results .= 'Units not numeric!
'; } else { $units = $_POST['units']; if ($units > 0) { $results .= "Units = $units
"; } else { $results .= "Units should be a positive value
"; } } /* validate shipping instructions airmail */ if (empty($_POST['instructions'] ) ) { $instructions = NULL; $results .= 'no shipping instructions!
'; } else { $results .= "instructions: {$_POST['instructions']}
"; // $results .= "