You've got a little flawed logic here. After adding a post the routine tries to determine the post number by looking up the post using subject, body, board, and user name. In your case, this isn't a unique post.
A simple fix would be to change select following the insert of the post to include the date posted in the where clause:
// ------------------------------------------------------------------
// Now we need to find out what the number of the post we entered was
$query = "
SELECT B_Number
FROM w3t_Posts
WHERE B_Username= '$Username_q'
AND B_Subject = '$Subject_q'
AND B_Body = '$BodySig'
AND B_Board = '$Board_q'
AND B_Posted = '$date'
";
$sth = $dbh ->do_query($query);
list($Mnumber) = $dbh -> fetch_array($sth);
Last edited by bud; 12/16/2002 11:49 AM.