help with forum "subscribe"

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
maxhudson
Forum Newbie
Posts: 2
Joined: Mon Jan 10, 2011 11:20 pm

help with forum "subscribe"

Post by maxhudson »

I have something like a forum (componentadvice.com) that i build pretty much from scratch and is still in progress.

I would like to have something like a subscription feature so when a user clicks a link, it adds the topic to their subscription, they will be notified somehow and recieve a link.

The way my tables are set up right now is like this:

topic table:

topic id (to identify the topic)
topic name (self explanatory)

(thats all you need to know in that table i think)

posts table:

post username
post id (identify post)
post topic (the topic the post was made on. equal to topic id)
post date

(thats all you need to know for that table too i think)

----

The way I was thinking of doing this, was

when they click subscribe, somehow add this to their list of subscriptions
when the page refreshes check if there are any new entries in the table with an id > the previous ids and with the same topic.
display the link to the page (which is displayed as the topic name), the author and the latest posts date

Is this reasonable?

Thanks!
Post Reply