gobbly2100 Posted February 22, 2010 Share Posted February 22, 2010 Hi there, I am looking to make some script that will hide a div after a certain date. The idea is for advertisers, so if they pay for one month I can enter in the end date that their ad will no longer show. I want to learn PHP so if I can get help on this then that would be great, I want to avoid any pr-made banner scripts etc. Link to comment https://forums.phpfreaks.com/topic/192872-creating-an-if-date-type-script/ Share on other sites More sharing options...
ohdang888 Posted February 22, 2010 Share Posted February 22, 2010 use a mysql table... and then you can use a query to select the current advertiser that has bought that time... the table would have the columns "startsOn" and "endsOn", with those values being of the DATETIME format it would be a query similar to: $todays_ad = mysql_query("SELECT * FROM ads WHERE (NOW() > `startsOn`) AND (NOW() < `endsOn`) LIMIT 1")or die(mysql_error()); Link to comment https://forums.phpfreaks.com/topic/192872-creating-an-if-date-type-script/#findComment-1015882 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.