$member_since_full_query="SELECT DATE_FORMAT('$row[createdate]', '%W %D %M %Y') AS member_since, DATE_FORMAT('$row[createdate]', '%d') AS since_day, DATE_FORMAT('$row[createdate]', '%m') AS since_month, DATE_FORMAT('$row[createdate]', '%Y' AS since_year)";
$current_day=date("d");
$current_month=date("m");
$current_year=date("Y");
////////////////////////////////////////////////////////////////
$member_since_result=mysql_query($member_since_full_query)
or die (mysql_error());
while($row = mysql_fetch_assoc($member_since_result))
{
echo "<center><b>You have been a member since: $row['member_since'].</br>";
$member_since_day=$row['since_day'];
$member_since_month=$row['since_month'];
$member_since_year=$row['since_year'];
}
$unixtime_now=mktime(0,0,0,$current_month,$current_day,$current_year);
$unixtime_since=mktime(0,0,0,$member_since_month,$member_since_day,$member_since_year);
$now = $unixtime_now;
$passed = $now - $unixtime_since;
$days = $passed / 86400; //which is 60 x 60 x 24
echo "That was $days days ago</b></center>";
That would also work eliminating a ton of DB queries, note combined all the queries into one, and used the AS keyword to name your query values, and used mysql_fetch_assoc to fetch an associative array so you can use $row['queryvalue'] instead of $row[0-5]
(just posting an alternate solution thats lots shorted also) ultimately, the above post, is the shortest I would say that this code could go 🙂