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

Recommended Answers

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

Jump to Post

All 6 Replies

browse around you will get thousand of free website design templates

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.

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?

Member Avatar

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.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.