restricted user from posting

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
phppro62
Forum Newbie
Posts: 16
Joined: Wed Oct 27, 2010 2:45 am

restricted user from posting

Post by phppro62 »

hi mate
please how to restrict user from posting 24 hours from the last post?
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: restricted user from posting

Post by social_experiment »

2 parts to the answer: Identify the user somehow and record the time of the post.

Code: Select all

Pseudo code
//
 if user = same.from.earlier
 {
  if time.from.last.post < (time.from.last.post + 24)
  {
   // take action against user
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Post Reply