please need to fix this i cant add in my database [duplicate]

Notice: Undefined variable: title in C:xampphtdocssampleappadd_record.php on line 19

Notice: Undefined variable: task in C:xampphtdocssampleappadd_record.php on line 19
An error has been occured!PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘title’ cannot be null in C:xampphtdocssampleappadd_record.php:20 Stack trace: #0 C:xampphtdocssampleappadd_record.php(20): PDOStatement->execute(Array) #1 {main

This is my code