Jump to content

Multiple-PMS


xyn

Recommended Posts

Hey!
I've got a small Private Messaging system, And I would
like to allow a larger box so people can send Pms to more
then one member, I wanted it so they ahve to separate
each member by a ','.

I have the basic idea on how to do it following my "array"
which is used to delete PM's with tick boxes, but that would
mean I will have to have more than one text box, it is quite
confusing...

If anyone could help. I would apreciate it.
- Thanks!
-- Ash
Link to comment
https://forums.phpfreaks.com/topic/20960-multiple-pms/
Share on other sites

yeah that's what that does because it explodes you normal box e.g. named users and then it explodes by ', ' so a comma and a space and creates an array called $users so in users we now have all the users with no comma and then the foreach $users as $user will rip each user out of the array and run what ever command u wish on them.

put the code working here [url=http://www.ukchat.ws/phpfreaks/users.php]http://www.ukchat.ws/phpfreaks/users.php[/url]

so e.g. code

[code]<form action="" method="post">
Users: <input type="text" name="users">
<input type="submit" name="submit" value="submit">
</form>
<?php
$users=explode(', ',$_POST['users']);
foreach($users as $user) {
echo $user.'<Br>';
}

?>[/code]


Liam
Link to comment
https://forums.phpfreaks.com/topic/20960-multiple-pms/#findComment-92965
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.