As far as I can understand, your SQL statement should be (you have an extra parameter in VALUES):
$SQLstmt="INSERT INTO msgs (authorid, author, title) VALUES
('" & myauthorid & "', '" & myauthor & "', '" & mytitle & "')"
And, may be, I'm missing smth, but why don't you write:
$SQLstmt="INSERT INTO msgs (authorid, author, title) VALUES
('".$myauthorid."', '".$myauthor."', '".$mytitle."')"
Is that something about inserting PHP variables into string, that I don't konw?