lingo5 Posted December 12, 2009 Share Posted December 12, 2009 Hi, I have done a php page that shows a list of events with start and finish date. I want to print an automatic message "Event ends today" when the end date on my recordset equals today date. This is the code that shows the start and end dates: this show start date // <?php echo date('d/m/Y',strtotime($row_eventos_RS['AG_fechai'])); ?> ...and this shows end date // <?php echo date('d/m/Y',strtotime($row_eventos_RS['AG_fechaf'])); ?> Thanks all for your help Link to comment https://forums.phpfreaks.com/topic/184895-help-echoing-a-message/ Share on other sites More sharing options...
asmith Posted December 12, 2009 Share Posted December 12, 2009 For your end date part: <?php echo date('d/m/Y',strtotime($row_eventos_RS['AG_fechaf'])); if (date('d/m/Y',strtotime($row_eventos_RS['AG_fechaf'])) == date('d/m/Y')) echo 'Event ends today'; ?> Link to comment https://forums.phpfreaks.com/topic/184895-help-echoing-a-message/#findComment-976047 Share on other sites More sharing options...
lingo5 Posted December 12, 2009 Author Share Posted December 12, 2009 Thanks a lot Asmith, works perfect. Easy when you know how...THANKS Link to comment https://forums.phpfreaks.com/topic/184895-help-echoing-a-message/#findComment-976056 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.