Hey,
I have been coding a bit on a site where you can login, submit your schedule in the form of posts. My problem is, that the users give a date to where the post is going to happen, and i wan't to check if the given date from the post is older than the current date. If so, then hide/do not show the post.
Like this
POST:
Work the 22/02-10 at 19:00 - 20:00 <---- meaning the 22nd of February 2010
CURRENT DATE:
24/02-10
Then it should hide/remove the post so it isn't viewable.
My php code is:
<?php
include "../../scripts/config.php";
include "../include/session.php";
global $max_items;
$query = "SELECT calID, calDate, calName, calDesc," . "DATE_FORMAT(calDate, 'd/m-y') as date " . "FROM calTbl WHERE calUser='$username' ORDER BY calDate ASC";
$result = mysql_query($query) or die(mysql_error());
while ($row = mysql_fetch_assoc($result)) {
$calID = strip_tags( $row['calID']);
$calStamp = $row['calStamp'];
$calDate1 = strtotime( $row['calDate']);
$calDate = strip_tags( $row['calDate']);
$calName = strip_tags( $row['calName']);
$calDesc = nl2br (strip_tags ($row['calDesc'], '<a><b><i><u>'));
echo "<p><b>($calID) $calName the $calDate at $calDesc</b></p>";
echo "<p>----------------------------------------------------------------</p>";}
?>
Any help would be appreciated, and if this post needs clarification please say so.
In Advance, thx for any help.