[Solved] Error when writing code php [duplicate]


$_POST has value, after submitting form, so before that anybody can’t use $_POST ..

   <?php
         if(isset($_POST['title'])){  
//Here in condition if(array_key_exists ( 'title' , $_POST )) can also be checked... 
//OR if(!empty($_POST)) OR if(!empty($_POST['title'])) can also be put..
            $title = strip_tags($_POST['title']);
         }
        ?>

solved Error when writing code php [duplicate]