Fixed undefined variable $msg in pm_write.php.