Topic: I wanna create a "Login Logging" page...
Don't ask why. Doesn't matter. I know it's possible, I just want to do it right.
Basically what I'm looking to do is add code to whatever controls user logging in and adds their name and time of login to a new table.
Then create a page (That only certain people would have access to.) that displays all this info.
I guess the real part I need help with is where the code should go for adding a row to the table I'll be using.
I'll have to create a new table in PHPMyAdmin. I guess I'd call it "loginlog" or something. It would have three columns. Username, IP and Time. Pretty obvious.
The whole reason I am doing this is because I need to know when and if certain users are visiting. You may say it would get too big too fast wouldn't it? Not really. My forum is really really small. If we have to, we can modify it to delete older entries after a week or month or whatever.
So I guess the first question is, what file should the Table modification code go in? And what code should be used? (I'm new to MySQL and the controlling of it with PHP. I'm able to easily read tables. But I've never made code that adds to tables and I don't want to screw anything up.) What file is used when a user first accesses a punBB forum and is registered to the database as "Logged in and online"?