Jump to content

Post for a certain time?


Kaboom

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/247992-post-for-a-certain-time/
Share on other sites

  Quote

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.

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;

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.