Private Messaging, like what we have here!

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

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.
gfirman
Forum Commoner
Posts: 30
Joined: Tue Nov 21, 2006 10:41 am

Post by gfirman »

Thanks man, yes thats what I'm trying to do. I have the Registration and Login up and running.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

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

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());
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.
Post Reply