Mail as facebook

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

Post Reply
andrewj
Forum Newbie
Posts: 13
Joined: Tue Nov 25, 2008 7:58 am

Mail as facebook

Post 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
User avatar
papa
Forum Regular
Posts: 958
Joined: Wed Aug 27, 2008 3:36 am
Location: Sweden/Sthlm

Re: Mail as facebook

Post 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
andrewj
Forum Newbie
Posts: 13
Joined: Tue Nov 25, 2008 7:58 am

Re: Mail as facebook

Post by andrewj »

Ok.. thanks a loot, but how do i say this mail is for this user?
User avatar
papa
Forum Regular
Posts: 958
Joined: Wed Aug 27, 2008 3:36 am
Location: Sweden/Sthlm

Re: Mail as facebook

Post by papa »

How much have you done on your site so far?

Can users sign up, log in etc?
andrewj
Forum Newbie
Posts: 13
Joined: Tue Nov 25, 2008 7:58 am

Re: Mail as facebook

Post by andrewj »

Ya they can log in, sign up, and the pages are protected.
User avatar
papa
Forum Regular
Posts: 958
Joined: Wed Aug 27, 2008 3:36 am
Location: Sweden/Sthlm

Re: Mail as facebook

Post by papa »

Well use the user id to determine who's message is to who.
andrewj
Forum Newbie
Posts: 13
Joined: Tue Nov 25, 2008 7:58 am

Re: Mail as facebook

Post by andrewj »

This was a great help. I'll try and post and errors if foound. Tks
andrewj
Forum Newbie
Posts: 13
Joined: Tue Nov 25, 2008 7:58 am

Re: Mail as facebook

Post by andrewj »

Hi

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

Thanks
User avatar
papa
Forum Regular
Posts: 958
Joined: Wed Aug 27, 2008 3:36 am
Location: Sweden/Sthlm

Re: Mail as facebook

Post by papa »

andrewj
Forum Newbie
Posts: 13
Joined: Tue Nov 25, 2008 7:58 am

Re: Mail as facebook

Post 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
Post Reply