Undefined variable _POST

First check if it is a non-empty POST request:

if ( 'POST' == $_SERVER['REQUEST_METHOD'] and ! empty ( $_POST )
{   // don't forget to sanitize these data!
    $data = $_POST;
}
else
{
    return FALSE;
}

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)