modified addpost.php