Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Mail

Internal Mailing System

the mail() function

Moderators: macek, egami, gesf

Internal Mailing System

Postby sayanab » Mon Jan 09, 2012 8:45 pm

I like to create a Private message system in my website just like I like the website users be able to sent private messages to each other. The copy of the message will be sent to other user's external email address and he be able to either reply from their external email or by login to my website.

Does anyone suggest me how to accomplish this?
I like to host my website in WebHostingHub
New php-forum User
New php-forum User
Posts: 1
Joined: Mon Jan 09, 2012 8:39 pm

Re: Internal Mailing System

Postby bigjoe11a » 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

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

Return to PHP coding => Mail

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.