Untitled

mail@pastecode.io avatar
unknown
php
3 years ago
313 B
15
Indexable
Never
<?php

	$age_day     = $_POST['day'];
	$age_month   = $_POST['month'];
	$age_year    = $_POST['year'];
	$dateObj=new DateTime($age_day-$age_month-$age_year);
	$ageLimit=new DateTime('-13 year');
	if($dateObj > $ageLimit){
    print 'Du skal være fyldt 13 år';
    } else {
    print 'Du er gammel nok';
    }
?>