heh, sorry i totally missed that whole post and got it sorted but i was put onto some super code
PHP Code:
if ($do == "doinvite")
{
globalize($_POST, array(
'personal_message' => STR,
'invite_username'
));
if ($personal_message)
{
$og_personal_message = "Please Enter A Personal Message The Group Description and Group Title Will Be Automatically Included.";
if ((strstr($personal_message, $og_personal_message)) AND (strlen($personal_message) == strlen($og_personal_message)))
{
$include_message = TRUE;
}
}
$invite_users = explode(";", addslashes(htmlspecialchars_uni(implode(";", $invite_username))));
$receipants = $DB_site->query("
SELECT user.userid as userid, user.username as username
FROM " . TABLE_PREFIX . "user AS user
WHERE username='" . implode('\' OR username=\'', $invite_users) . "'
ORDER BY user.username
");
if ($DB_site->num_rows($receipants) != count($invite_username))
{
eval(print_standard_error('grps_invite_invalidusername'));
die();
}
only problem is, i need to make sure that if they only want to invite one person it will still go through?
i've figured the best thing would be to let it go through, split the array at an empty point then remerge it?
that way i'm not making the database so any extra work as even if they put in two usernames, had a blank field then another two usernames it would just remove the space and then do the queries for the other four?