I'm trying to get posted data of someones birthday, to send over to another page and display their age, so far I've got this which works
<?php
$c= date('Y');
$y= date('Y', strtotime('1993-12-29'));
echo $c - $y;
?>
But how would I do this with posted data? I've tried:
$c= date('Y');
$y= date('Y',strtotime($_POST['sBirthday']));
echo $c-$y;
Although this doesn't work, any ideas?