Custom Form not generating URL

The problem is problably here:

<form id="oselector" method="GET" action="<?php the_permalink(); ?>">

Your code is not in the WordPress Loop. According to the Function Reference (emphasis added):

the_permalink() – Displays the URL for the permalink to the post currently being processed in The Loop. This tag must be within The Loop, and is generally used to display the permalink for each post, when the posts are being displayed. Since this template tag is limited to displaying the permalink for the post that is being processed, you cannot use it to display the permalink to an arbitrary post on your weblog. Refer to get_permalink() if you want to get the permalink for a post, given its unique post id.

You might try this:

<form id="oselector" method="GET" action="<?php echo get_permalink( get_queried_object_id() ); ?>">

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