Help me out with this Undefined index ?

You should use isset

$id = isset( $instance['id'] ) ? esc_attr( $instance['id'] ) : '';
$number = isset( $instance['number'] ) ? esc_attr( $instance['number'] ) : '';

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