sudh
sudh

Reputation: 1105

php posting messages with future date

i am implementing a forum in php. I Would like to add a feature in which user can add a post by setting some future date so that on that date in future the post will be displayed. Could anyone give me an idea how to implement that(logic).

Upvotes: 0

Views: 66

Answers (1)

Artefacto
Artefacto

Reputation: 97835

Submit the post to the database with a future time and, when you query it to find the posts, limit the results to those whose time is less or equal than the current time.

If you still want to distinguish time of publication from time of submission, you can have one column for each and display the post based on the time of publication.

Upvotes: 2

Related Questions