Submitting POST data to a custom page template triggers a 404, why?

You need to change:

<form action="index.php" method="post">

to:

<form action="" method="post"> 

I’m guessing that this is just a test case, but be sure that your final template has calls to wp_head and wp_footer in there.

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