I wrote a little script that sends an e-mail to all moderators when anyone adds or replies to a post. I put it right after the two "INSERT" lines on addpost.php. I realize this may not work on all systems but it seems to do the trick for me: <br /><br /><br /><?<br />/* E-mail board moderators to let them know about the post. */<br />$connection = mysql_connect("localhost","root", "connect") or die("ConnectFailed");<br />$db = mysql_select_db("ubb_threads", $connection) or die("SelectFailed");<br />$sql = "SELECT * FROM w3t_Moderators where Mod_Board = \"$Board\""; <br />$sql_result = mysql_query($sql, $connection);<br />while ($row = mysql_fetch_array($sql_result)){<br />$username = $row["Mod_Username"];<br />$sql2 = "SELECT * FROM w3t_Users where U_Username = \"$username\""; <br />$sql_result2 = mysql_query($sql2, $connection);<br />$row2 = mysql_fetch_array($sql_result2);<br />$email_address = $row2["U_Email"];<br />$mailto = $email_address; <br />$mailsubject = "UBB Threads Forum Post";<br />$mailheaders = "FROM: []ubbthreads@apigroupinc.com";[/]<br />$mailbody = "<br />You have a new post to your UBB Threads forum.<br />Please check your forum to approve this post:<br />From: $postername<br />Subject: $FormSubject<br />Body: $FormBody<br />Click here to view UBB Threads forums:
http://myserversurl/www/ubb_threads/ubbthreads.php <br />";<br />mail($mailto, $mailsubject, $mailbody, $mailheaders);<br />}<br />?>