Also you write to the EEPROM at 50 times a second while these inputs are LOW.
Please read and UNDERSTAND this before trying to run any code.
Reference EEPROM
If not for your own good, then to prevent you from torturing any more hardware.
Also as you define the variable i at the start of the loop function it won't contain the changes in value you make for the code that follows the write. Being in a function it will be initialised at some random value found in a random address location, so it won't change anyway.
Are you actually looking at the serial print on the serial monitor? This will show you what value is being written, Try it at the start of your loop function as well.
I have also changed the title of this thread to something that is closer to what your real problem is.