How to hard code to login as admin? In the past, I developed a Drupal site in my localhost. After that, I uploaded to production site. Everything was OK.

Recently, my HDD was died. So, I lost my Drupal site source code. I downloaded my production site on localhost.

I cannot log in. I think the problem is cookies.

How can I force Drupal to get my login by adding some code lines?
You have the possibility to edit the current password locally.

You should take a look at Resetting the administrator password with sql-query. It is possible with some commands and SQL queries to change the current password for your admin user (UID=1).