Okay well the above query would be more like this
SELECT U_Name,U_Email FROM w3t_Users WHERE U_Groups LIKE '%-2-%'
That would grab both Username and Email
You could make it simple and just list username and link an email client to load with the mailto:$email statement
Or the more complex way would be to actually write up a form which would bring up another page to email the mods in a generic mod page.
If you need further assistance you can contact me privately.
Here is an example of a very easy pal box that brings up mod names and a link to email. Things can get alot more complicated from there
<?
echo <<< template
$tbopen
<tr>
<td align="left" class="tdheader">
Email Moderator's
</td>
</tr>
template;
$query = "
SELECT U_Username,U_Email
FROM {$config['tbprefix']}Users
WHERE U_Groups LIKE '%-2-%'
";
$result = mysql_query($query)or die("Query failed");
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
$Mod = $line["U_Username"];
$Email = $line["U_Email"];
echo <<< template
<tr>
<td align="center" class="lighttable">
<a href="mailto:$Email">$Mod</a>
</td>
</tr>
template;
}
mysql_free_result($result);
echo <<< template
$tbclose
template;
?>