Page 1 of 1

Mail as facebook

Posted: Tue Nov 25, 2008 8:01 am
by andrewj
I'm creatign a mail facility in my site. I want the mail to function as facbook and otehr social networks as frinds could mail each other in the site itself and reciever mails. How can i do this how is this technology known as?

Andy

Re: Mail as facebook

Posted: Tue Nov 25, 2008 8:32 am
by papa
A quick example:

mysql table:

id | user_id | message_text | message_topic | from_user_id | status | date

When your user logs in you display all messages on his user_id. All with status N is unread for example.

However, when sending messages to multiple users you might want to restructure that layout.

Reading this article: http://www.tonymarston.net/php-mysql/many-to-many.html (which I got from a friendly soul on the forum)

You can design it a lot better.

message
id | from_user_id |message_text | message_topic | date

message_identifier
message_id | to_user_id | status

Re: Mail as facebook

Posted: Tue Nov 25, 2008 8:38 am
by andrewj
Ok.. thanks a loot, but how do i say this mail is for this user?

Re: Mail as facebook

Posted: Tue Nov 25, 2008 8:42 am
by papa
How much have you done on your site so far?

Can users sign up, log in etc?

Re: Mail as facebook

Posted: Tue Nov 25, 2008 9:01 am
by andrewj
Ya they can log in, sign up, and the pages are protected.

Re: Mail as facebook

Posted: Tue Nov 25, 2008 9:06 am
by papa
Well use the user id to determine who's message is to who.

Re: Mail as facebook

Posted: Tue Nov 25, 2008 2:33 pm
by andrewj
This was a great help. I'll try and post and errors if foound. Tks

Re: Mail as facebook

Posted: Wed Jan 14, 2009 10:58 am
by andrewj
Hi

How do get the sessions and get the correct message for the correct user?

Thanks

Re: Mail as facebook

Posted: Wed Jan 14, 2009 11:07 am
by papa

Re: Mail as facebook

Posted: Wed Jan 14, 2009 11:11 am
by andrewj
thanks i have done the login and maintaining the sessions in the login. It's working perfectly. The mail box also the data is going to the database but how to i identify the perticular message is for a perticular user?

thanks