i was reading tutorials about php date() function,
i wonder how could i write the code that show total number of days of my age till today ?
but i am stuck here,
<form method="POST" action="<?php echo $_SERVER['PHP_SELF'] ?>">
Example: 2010/18/12
</br>
<input type=text name="year" value="Year">/
<input type=text name="day" value="Day">/
<input type=text name="month" value="Month">
<input type="submit" name="submit" value="GO">
</form>
<?php
date_default_timezone_set ('Asia/Karachi');
if (isset ($_POST['submit'])){
$year= $_POST['year'];
$day = $_POST['day'];
$month = $_POST['month'];
echo date ("D", mktime(0,0,0,$month,$day,$year));
}
?>
this is currenty taking the input of date of birth of a user , but how can i convert it into total number of days ?
please provide me with some logic