Hmm, that seems to be what I am looking for, but it doesn't seem to be working correctly, or so I think.
What I am basically trying to do is create a script for a forum, that you will enter the Date you registered, and your current number of posts, and it will tell you the average number of seconds between your posts.
This is what I have, but I don't THINK it's working...
<?
if(!isset($_POST['posts'])){
echo"<Form Method=Post>
Date Joined: (Month || Day || Year) <Input type=Text size='1' name=month maxlength=2><Input type=Text size=1 name=day maxlength=2><Input type=Text size=1 name=year maxlength=4><BR>
Total Posts: <Input type=Text name=posts maxlength=5><BR>
<Input type=Submit Value=Calculate>
</FORM>";
}
else
{
$month = $_POST['month'];
$day = $_POST['day'];
$year = $_POST['year'];
$posts = $_POST['posts'];
$curmonth = date("m");
$curday = date("d");
$curyear = date("Y");
$a = mktime(0,0,0,$day,$month,$year);
$b = mktime(0,0,0,$curday,$curmonth,$curyear);
$c = $b-$a;
$total = $c/$posts;
echo $total;
}
?>