영원한사랑


미리보기 : http://oxtag.com/php/p/adult.php


<? 
// 년도에 따른 19금 (성인인증)
// 디비 입력된 생년월일 1985/6/3
if(date("Y") - substr($Mdata[birth],0,4)<19
){
echo
"미성년자"

}else{ 
echo
"성인"


?>



<?
// 월에 따른 19금 (성인인증)
// 생년월일 1985/6/3
$birth = "1985/06/03"
;
$birth_exp=explode("/",$birth
); 
$birth_stamp=mktime(0,0,0,$birth_exp[1],$birth_exp[2],$birth_exp[0]+19
); 

$adult_stamp=mktime(0,0,0,date("m"),date("d"),date("Y"
)); 

if(
$adult_stamp > $birth_stamp


echo
"성인"
;

else 

echo
"미성년자"
;

?>