Internal Mailing System

the mail() function

Moderators: egami, macek, gesf

Post Reply
User avatar
New php-forum User
New php-forum User
Posts: 137
Joined: Wed Aug 31, 2011 3:55 am
Location: USA

Sun Jan 29, 2012 6:26 pm

To give you an idea on how to do this. Create one new table in your database.
Table Name `users_pm`
id Record Id
tuid To user ID
fuid From User ID
fname From User Name
subject Subject of message.
msgdate Date of Message
msg Message Text

Create a function that will check to see if the current log in user has any messages.

Code: Select all

Function CheckPM()
   //connect to mysql database

   $query = mysql_query("select * from `users_pm` where uid = {$_SESSION['userid']}");
   $record = mysql_fetch_array($query);

    foreach($record as $upm)
        echo 'From :'.$row['fuid'];
        // and so on. Just display the messages from that user. You can include what you wanted the
        // user is view. You can create links to view and reply to the message. Just use the same table.


Hope this helps


Post Reply