$stmt = $db->prepare("SELECT id,dated,title,description,pdf FROM tblNotice WHERE status=0 ORDER BY dated DESC");
$stmt->execute();
$stmt->store_result();
$stmt->bind_result($id,$dated,$title,$description,$pdf);
if($stmt->num_rows > 0){
echo '
| Date |
Title |
Description |
PDF |
';
while($stmt->fetch()){
$currentdate = strtotime(date('Y-m-d'));
$new = strtotime(date('d M Y', strtotime($dated.' + 15 days')));
echo '
| '.date('d M Y', strtotime($dated)).' |
'.$title.' |
'.$description.' |
';
if($pdf != ''){
echo '';
}
else{
echo '-';
}
echo ' |
';
}
echo '
';
}
$stmt->close();
?>