Ok, I have had this problem before and was able to fix it but now nothing is working for me for some reason.
I changed the web/secure/use_in_adminhtml value from 0 to 1 within the magento configuration the last time I was logged into the admin panel. I was doing this to test secure connection on my dev site.
Problem: Can't login to my admin account now. I keep getting the message "Invalid Form Key. Please refresh the page."
I have already tried:
1.)Update the core_config_data table and changed the value from 1 to 0 for path web/secure/use_in_adminhtml
2.) DELETE FROM core_config_data WHERE path='web/cookie/cookie_domain' and
DELETE FROM core_config_data WHERE path='web/cookie/cookie_path'
3.) Deleted var/cache folder (There was nothing in the folder)
4.) There was no var/session folder to delete
5.) Checked my app/etc/local.xml files and added these 2 lines:
6.) Cleared Chrome's cookies and cache, tried different browsers.
7.) Even though I have set the value for "web/secure/use_in_adminhtml" to 0, it still goes to an https page when typing in my admin address. If I remove the "s" and leave it as http it directs back to the https address.
Any other things to try? I'm totally lost.