I have a site now that requires it to be updated everyhour with a new story. So times this isn't possible so if i could submit three at a time and have it as "datetime" in the database and for the php to only display it if the time has past i could achieve all this without being there.
I'm sure its possible i just don't know enough of the code to figure it out myself....
here is my current code
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<?php do { ?>
<?php
if ($row_callinfo['date'] <> $current_date){
$current_date = $row_callinfo['date'];
echo "<br>";
?><span class="dailyheadings"><?php
$year = substr($row_callinfo['date'], 0, 4);
$month = substr($row_callinfo['date'], 8, 2);
$day = substr($row_callinfo['date'], 5, 2);
$unix_time = mktime(0, 0, 0, $day, $month, $year);
$date = date("d-m-Y", $unix_time);
if ($unix_time<mktime()) {?>
<tr>
<td> </td>
<td colspan="2" align="left">
<?php echo "Daily Link For The ";
echo $date;}
echo "</span>";
echo "<br>";
?><br></td>
</tr>
<tr>
<td width="5%"> </td>
<?php if ($unix_time<mktime()) {?><td width="10%">
<div align="left"><a href="<?php echo $row_callinfo['link']; ?>" target="_blank"><img src="<?php echo $row_callinfo['picurl']; ?>"></a> </div></td>
<td width="85%"><div align="left"><?php echo $row_callinfo['comment']; ?><?php echo "<br>";
?> <?php ;} ?></div></td><?php ;} ?>
</tr><?php
} while ($row_callinfo = mysql_fetch_assoc($callinfo)); ?>
<?php
mysql_free_result($callinfo);
?>
</table>
I only want it used for sorting purposes, so that say i put an article in for 17:00 and its currently 13:00 it won't show for another 4 hours, then after 17:00 it will turn up.
The code is currently kind of working but is only using the date of the entry as a filter not the time like i want it to.
any ideas guru's?