Kaboom Posted September 28, 2011 Share Posted September 28, 2011 The script i am making allows people to post jobs for people to see but I want to be able to set it so you can have it show for a certain period of time (like 1-30 days) or have no time limit on the post. What's a good way to do that? I will store the date to show it until in the database if possible and then when it calls them don't get the ones that are past that date etc, but not sure as to how and the php.net manual didn't help Quote Link to comment https://forums.phpfreaks.com/topic/247992-post-for-a-certain-time/ Share on other sites More sharing options...
trq Posted September 28, 2011 Share Posted September 28, 2011 You just described how. Quote Link to comment https://forums.phpfreaks.com/topic/247992-post-for-a-certain-time/#findComment-1273378 Share on other sites More sharing options...
Kaboom Posted September 28, 2011 Author Share Posted September 28, 2011 You just described how. Say they want it to be posted for 30 days, how do I make it know what date that will be from now to put into the database and then when it IS that date, how do I make them now show anymore? :s I know exactly what I WANT to do, not sure how though. Quote Link to comment https://forums.phpfreaks.com/topic/247992-post-for-a-certain-time/#findComment-1273379 Share on other sites More sharing options...
cunoodle2 Posted September 28, 2011 Share Posted September 28, 2011 Post your code so far. It will be in your mysql query where you say "AND expiration_date < now" or something along those lines. Quote Link to comment https://forums.phpfreaks.com/topic/247992-post-for-a-certain-time/#findComment-1273560 Share on other sites More sharing options...
Kaboom Posted September 30, 2011 Author Share Posted September 30, 2011 I have no code as far as calling it yet because im not even sure how to begin and I don't want to skrew up and make it load none or all of them like i probably will. Here's my database setup though for jobs: CREATE TABLE IF NOT EXISTS `jobs` ( `id` int(10) unsigned NOT NULL auto_increment, `position` varbinary(45) NOT NULL, `company` varbinary(45) NOT NULL, `posted` varbinary(45) NOT NULL, `ends` varbinary(45) NOT NULL, `wage` varbinary(45) NOT NULL, `category` varbinary(45) NOT NULL, `desc` varbinary(200) NOT NULL, `reqs` varbinary(200) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2; Quote Link to comment https://forums.phpfreaks.com/topic/247992-post-for-a-certain-time/#findComment-1274265 Share on other sites More sharing options...
cunoodle2 Posted September 30, 2011 Share Posted September 30, 2011 <?php If ($code == non_existent) $help = false; else $help = true; ?> Quote Link to comment https://forums.phpfreaks.com/topic/247992-post-for-a-certain-time/#findComment-1274296 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.