-1

Hello,

I'm a pretty basic php user, and I'm wondering how someone would go about implementing a message system into a website with different users. It doesn't have to be anything specific, I'm just wondering about the basic design of it.

Thanks

5
Contributors
6
Replies
8
Views
7 Years
Discussion Span
Last Post by SKANK!!!!!
-1

Hey.

What do you mean by "a message system"?
Like a blog, or like a messenger?

If it's a blog, there are probably hundreds of codes available online for you to choose from. Wordpress being something of a leader among them.

If you mean a messenger system, then PHP alone is probably not the best way to go. Something involving AJAX wold be more promising.

Edited by Atli: Wrong wordpress link.

0

Not a IM app or blog

I don't mean anything really complicated, I'm mainly just wondering how you would store data from a message that one user sent to another. You wouldn't be able to store it in databases right?

1

Why not?
You can use PHP to send emails/store messages from one user to another in a DB. This implementation can be as simple or as complex as you like.

If you're interested in making a simple messaging system. A possible mysql setup would be:

users table
user_id
username
pw
email

msgs table
msg_id
msg_title
msg_body
msg_sender (foreign key on user_id)
msg_recipient (foreign key on user_id)
msg_status (e.g. pending/read/etc)
notify_when_open (find out if your msg has been read)

If you're new to php, you will have some fun creating forms for msgs and validating /cleaning input and then improving the design to incorporate diffrent msb folders, send to multiple recipients etc. This is a really good 'project' to get your teeth into. Ready made scripts may be useful, but if you're starting out, they may cause more confusion than anything, especially if they're object-orientated.

0

Ohh...I see, I wasn't sure about the database design part. I'll go try that and then post it back here to see if its ok.

Thanks

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.