Hello

I have found a good template about PM system.

http://www.webestools.com/scripts_tutorials-code-source-15-personal-message-system-in-php-mysql-pm-system-private-message-discussion.html

But here is the question, is there any way to modify it to be able to send to multiple people?

Like

Message 1 is subject to send to a group of people.
Message 2 is send to an individual member.

This template is working only if you are sending to one person only.

I am thinking to add a while loop around line 44 on new_pm.php and so it will keep sending until no recipient left on the field. any suggestion?

E.g.
To member 1, member 2, member 3
it will send the message to them individually.

thanks

Recommended Answers

All 5 Replies

any suggestion?

Just use explode() on the member field to generate an array, so you can use foreach().

Good one! will try that! Didnt remember I can use explode()!

wait...but then it will come to a problem...if I am going to send a group messages to like 20 people than I will have 20 new messages on my message box...

on this template it works like

member A sending member B a message
this message will get an unique ID (let say ID203) and these 2 members' ID(or name?)

member A sending member C a message (let say ID207)

and so on member A's message list will show all his message
(ID203 and ID207)

If he sent a group messages to 20 people (via the method we talking about) than it will be something like

ID208
ID209
.
.
.
ID227

Which also mean that his message box will show 20 exact same message except the recipient is different.

This is only from what my understanding what if I use explode and foreach in this case...

Anyway I am modifying it and will give the result later on.

Be a part of the DaniWeb community

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