Need to have edit and delete links for posts on message board

I have just built a message board using the tutorial,

Now the tutorial contains an index page with a text box for inserting a new thread title, the name of the person starting the thread and the message.

There is a page, newthread.php which contains the code to nsert the name, thread title, message and has a return link which will take the user back to the index page which will then display the thread with replies posted.

There is a page, msg.php for showing the person’s name, title and the replies posted when a specific thread is selected.

Another page, newreply.php has been created for inserting replies, update reply counts and also has a reply posted link.

Now the codes for the above 4 pages have been given in the tutorial. After changing them a little to suit my requirements and with the help provided by my sitepoint freiends, I now have a message board running.

Now, I want to do 2 things which are not given in the tutorial. I want to create a code so that the person starting the thread or posting a reply can edit his or her own thread or post, but only for a specific period (e.g. it cannot be deleted or edited after a certain number of hours).

Also, I want an administrator’s page which will enable me to edit some post which I find unsuitable.

Now, I want to try to do the above myself and later turn to my sitepoint friends if I run into some difficulty. But can anyone give me a lead?

I suppose I have to create pages like edit.php and delete.php which will have links in the index page. (or should the links be on the msg.php page?) But how do I make sure that a person can only edit his or her thread or reply and not somebody elses? Will that necessitate a login system for each person who wants to start a new thread or give a reply to one of the threads? That of course is one of the things on my learning agenda, but as of now, if I just decide to have a message board on my personal site where any of my friends can start or post replies on existing threads, is it necessary for them to log in?

If you want to, you can give anybody the possibility to post or reply. But if you want to give edit possibilities to the poster only, then you need a login system. How else would you identify who made the post/reply? You can’t use just the name, because anyone could use that name and then edit the post.

I can understand your point about needing a login system to give edit possibilities to the poster only.

It may not be a good idea to let anybody edit or delete, isn’t it? Then it will enable one person to delete or edit somebody else’s post.

On the other hand, I am asking this as a newbie. Is it always better for a message board to have a login system? I know that big forums like Sitepoint need one but what about the small message boards incorporated in the not so big sites?