HTML is a markup "language". It can't be used for dynamic stuff like that. To write to a file you need a server side scripting language, as client side stuff can't do that (unless maybe you're using a Java applet). Take a look at php.net for more info...