I dont know if I am misunderstanding or what... the functions you mentioned will give me the date 14 days ago... but how do I compare that to the date I have to see if the date is greater then 14 days old?
this is what I am working on now...
$today = date("Y-m-d");
$w_ago = strtotime("-14 days");
$w_str = (date("Y-m-d", $w_ago);
$sql = "SELECT * FROM users where $today > $w_str";
$Result = mysql_query($sql, $dbConn) or die("Error: " . mysql_error());
$dbarray = mysql_fetch_array($Result);
$date = $dbarray['datestamp'];
$num = count($dbarray);
for ($=0; $c<$num;$c++){
print "<br>". $dbarray['fName'] . $dbarray['lName'] . $dbarray['datestamp'];
}
print "<br>Number of Matching Records: " . $num;
This outputs:
JohnDoe2005-01-30
JohnDoe2005-01-30
JohnDoe2005-01-30
JohnDoe2005-01-30 etc
Number of Matching records: 24
What am I doing wrong... the date returned is only 4 days from todays date. I need to be sure it is 14 days or more from todays date.