$_POST['submit'] and so on don't return 'true' or 'false' so u cant just use them right away in your if statement, just use isset() like the guys above said.
you can ignore it (error_reporting(E_ALL ^ E_NOTICE); in the beginnnig of the file), because nothing is really broken (just a "notice"), or you fix it by doing it like this:
and maybeu wrote smth wrong in ur html form
checking if its empty/set ?
if($_POST['submit'] == ''){
echo 'fu';
}
or != '' ofc
if(!empty($_POST['submit']) && !empty($_POST['title']) && !empty($_POST['writer']) && !empty($_POST['text'])){