For external (I2C) eeprom, use this tutorial:
http://www.arduino.cc/playground/Code/I2CEEPROM
For internal eeprom, use this:
For external (I2C) eeprom, use this tutorial:
http://www.arduino.cc/playground/Code/I2CEEPROM
For internal eeprom, use this: