Jump to content

Recommended Posts

You may remember me from a while back when i asked help about my Private Messaging System. Well its all good now, and i can effectively put in and take out the private message.

 

My question is now, how can i make it like Invisionfrees/any forum private messaging?

 

So far my inbox is like this:

 

[From] admin [subject] Test [Message] Hey.... Test.

 

And i would like it like

 

[subject] Test [From] Admin

 

And the word Test be incoded in a link to lead to a nice little page stating the From, Subject and Message. (Like a forum PM)

 

I have no clue how to do this... Thanks :)

 

 

Link to comment
https://forums.phpfreaks.com/topic/104112-private-messaging-system/
Share on other sites

uhhmm here ill pastebin all the import things for you.

 

This is basically what it is (minus the control panel, minus the login screen (which i doubt is important))

 

PS... The includes are to help identify the $username sending and receiving...

 

PPS... It actually works :P

 

http://pastebin.com/m1b803a4

there should be an id field on your message table that auto-increments when a record is added. after you insert a message, you can get the id of that new record using mysql_insert_id() (assuming you're using MySQL):

 

$sql = "INSERT INTO messages VALUES (NULL,'$message_text');
mysql_query($sql) or die(mysql_error());
$new_message_id = mysql_insert_id();

1.) I have never seen a PMing system tutorial...

2.) I really do not want to redo this PM system... Through all this debugging and building from scratch (which took me a while, and i learned a lot) I dont want to stop now.

1. http://www.pixel2life.com/search/php_coding/Private%20Message/1/ That page lists 2 tutorials.

2. Thats fine, but maybe reading through a tutorial will help explain how the ID system would work.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.