Sorry Mystics, but I definetively think your insert queries $sql=$DB_site->query("INSERT INTO privatemessage (privatemessageid, folderid, userid, touserid, fromuserid, title, message, dateline, showsignature, iconid, messageread) VALUES (NULL,'0','$user[userid]','$user[userid]','$fromuserid','".addslashes(htmlspecialchars($subject))."','".addslashes($sendmessage)."',".time().",'1','0','0')"); and the other you specified two posts above, should be replaced with something like:// insert message in inbox of the receiver
$DB_site->query("INSERT INTO privatemessage (privatemessageid,userid,touserid,fromuserid,title,message,dateline,showsignatur e,iconid,messageread,folderid,receipt) VALUES (NULL,$user[userid],$user[userid],$bbuserinfo[userid],'".addslashes(htmlspecialchars($subject))."','".addslashes($sendmessage)."',".time().",'1',0,0,0,0)");
// insert message in outbox of the sender
$DB_site->query("INSERT INTO privatemessage (privatemessageid,userid,touserid,fromuserid,title,message,dateline,showsignatur e,iconid,messageread,folderid,receipt) VALUES (NULL,$bbuserinfo[userid],$user[userid],$bbuserinfo[userid],'".addslashes(htmlspecialchars($subject))."','".addslashes($sendmessage)."',".time().",'1',0,0,-1,0)");
What do you think about ?
Thnx