Use WordPress engine for user registration and management

This may be good starting point for you:

http://codex.wordpress.org/Integrating_WordPress_with_Your_Website
http://codex.wordpress.org/Developer_Documentation (see function reference for admin-related functions list)

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