How to create an user defined page?

In your example.php file add this line at the top, this will enable all wordpress functions such as $wpdb, get_header(); etc.

<?php require_once('LINK-TO-DIRECTORY/wp-blog-header.php'); ?>

Recommended reading – Codex – Integrating WordPress with Your Website

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