Mail as facebook
Moderator: General Moderators
Mail as facebook
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
Andy
Re: Mail as facebook
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
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
Ok.. thanks a loot, but how do i say this mail is for this user?
Re: Mail as facebook
How much have you done on your site so far?
Can users sign up, log in etc?
Can users sign up, log in etc?
Re: Mail as facebook
Ya they can log in, sign up, and the pages are protected.
Re: Mail as facebook
Well use the user id to determine who's message is to who.
Re: Mail as facebook
This was a great help. I'll try and post and errors if foound. Tks
Re: Mail as facebook
Hi
How do get the sessions and get the correct message for the correct user?
Thanks
How do get the sessions and get the correct message for the correct user?
Thanks
Re: Mail as facebook
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
thanks