Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $optionsMonth = array('options'=>array('min_range'=>1, 'max_range'=>12));
- $optionsYear = array('options'=>array('min_range'=>1900, 'max_range'=>9999));
- if ((filter_input(INPUT_GET, 'month', FILTER_VALIDATE_INT, $optionsMonth))&&(filter_input(INPUT_GET, 'year', FILTER_VALIDATE_INT, $optionsYear))){
- $month = filter_input(INPUT_GET, 'month', FILTER_VALIDATE_INT, $optionsMonth );
- $year = filter_input(INPUT_GET, 'year', FILTER_VALIDATE_INT, $optionsYear);
- } else {
- $datetime = new Datetime('NOW');
- $month = $datetime->format('m');
- $year = $datetime->format('Y');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement