Date comparision
Posted: Mon Jul 06, 2009 6:45 am
here is what i wanna do. I want to take the joindate and compare it to the current date if its been more then 15 days between the 2 then it will suspend. but not sure how to get it working. I am close i think.
<?php
$s = mysql_query("SELECT * FROM user WHERE id='2'") or die(mysql_error());
$info = mysql_fetch_array($s, MYSQL_ASSOC);
@mysql_free_result($s);
if ($info['joindate']) < = date("m-d-Y", 30*86400 + time());
(query here to update account to suspened)
}
?>
hope somone can give me a lil more insight as i am still lost some
Thanks
<?php
$s = mysql_query("SELECT * FROM user WHERE id='2'") or die(mysql_error());
$info = mysql_fetch_array($s, MYSQL_ASSOC);
@mysql_free_result($s);
if ($info['joindate']) < = date("m-d-Y", 30*86400 + time());
(query here to update account to suspened)
}
?>
hope somone can give me a lil more insight as i am still lost some
Thanks