I always do POST’s check validation, sometime its get too messy and long. What is the best way to keep it shorter and tidy?
Example:
if (isset($_POST['albumName']) && trim($_POST['albumName']) != "" && isset($_POST['slugName']) && $_POST['slugName'] != "" && is_numeric($_POST['PhotoCatID'])) {
//All good
}
The standard Filter extension may have what you’re looking for,
filter_inputin particular:(I personally ended up writing wrappers named
filter_get,filter_postandfilter_requestjust to make the lines a bit shorter…)