Hi guys
I'm fairly new to PHP and MySQL Programming (but no complete newbie, I've done some programming before 😉 ). I've coded some guestbooks and news systems so far but that seemed pretty easy to me.
So I decided to program my own PHP-MySQL Forum.
You can already signup, login and then post topics and threads which other users can read. Now here is the (rather complicated) problem:
When you visit an area in the board I want to check if a topic is new or old and display the appropriate icon for this (like in this forum).
I understood, that you have to compare the "lastpost_time" of the thread with some value stored in the users column. If the lastpost_time is greater than the lastvisit the topic is new. That's how to do it.
In my forum I have also included a table with the users currently online. When you enter the forum your user_id and the current time are added there. When you do something in the forum the time is updated. When you have done nothing for 5 minutes you are deleted from the table and your user_lastvisit value is stored in the database (in the users table).
So is it possible using the user_lastactivity and user_lastvisit value to check if there are new posts in any thread? Or does anybody know how this is accomplished in other boards?
I hope you understood my problem and can help me.
Oh, and BTW, I'm not sure if it is allowed here but does anybody know a good free webspace provider with PHP any MySQL support (except Lycos)? The board looks pretty nice and I would like to upload it to test it online.