Hello, i'm kindly in a trouble. I was a newbie here and also not expert in php. So, my question maybe too easy and my english may broken. If you know the answer, tell me, I really need help. My question was about expiry date warning. I wish to make the expired date give a warning to the user, a week before. So, I try to make this code, still not working. Yeah, I know it is too simple, but I hope anyone can help me here. Thanks a lot. Here is my code.
<?php
$dtwarning = mysqli_prepare($db,"SELECT tarikh_tamat FROM spoc_pma2012 ORDER BY bil");
$dtwarning->execute();
$currentDate = date("Y-m-d");
while($dtwarning = row($tarikh_tamat)-7){
if($currentDate=$dtwarning){
echo '<div class="error">
<p>Warning</p>
</div>';
}
}
?>
Hope anyone can help me. :)
Sorry for disturbing all of you.