Private Messaging, like what we have here!
Moderator: General Moderators
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
phpBB uses PM (phpBB is the forum software that we run here). You could always download the phpBB code and try sifting through it. I will warn you in advance, it is a fairly complex beast if you are not used to PHP, but if you can spot logic, you may well be able to figure out how they set theirs up.
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
it's pretty simple for sending messages to eachother, simply setup a table called messages with
message id, sender_id, recipient_id, message, timestamp
when sending a message simply do an
note: associate the *recipient id* with whomever is sending the message, and insert their respective id number, same goes for *recipient id* except insert recipient user's id.. and so forth with the message
To view messages simply query all messages in that table with the respective `recipient_id` from your users table.
message id, sender_id, recipient_id, message, timestamp
when sending a message simply do an
Code: Select all
mysql_query('INSERT INTO `messages` SET `sender_id` = *sender id*, `recipient_id` = *recipient id*, `message` = \'*message*\', `timestamp` = '. time()) or die(mysql_error());To view messages simply query all messages in that table with the respective `recipient_id` from your users table.