I know is javascript but could anyone help me convert to php so i dont have to use a form?
[CODE]<SCRIPT LANGUAGE=”JavaScript”>
var show_time=true;
function birthdate() {
var today=new Date();
var curyear=today.getYear()
if (curyear < 1000)
curyear+=1900
writeyourAge()
}
function writeyourAge() {
TheDate = new Date();
Month = TheDate.getMonth();
Day = TheDate.getDate();
Year = TheDate.getYear();
if (Year< 1000)
Year+=1900
by = “{listing_field_doby_value}”;
bm = “{listing_field_dobm_value}”;
bd = “{listing_field_dobd_value}”;
BDate = Date.UTC(by,bm,bd);
if (Year<2000) {
CDate = Date.UTC(Year,Month,Day);
} else {
CDate = Date.UTC(Year,Month,Day);
}
Age = CDate-BDate + (1000*60*60*24*30);
var mytext = document.my_age.yrs.value = parseInt(((((Age/1000)/60)/60)/24)/365.25,10);
document.write(‘ ‘ + mytext + ‘ ‘);
}
</SCRIPT>