In what language? You can't do it in regular HTML, you need some sort of scripting language that'll handle passing variables from one page to the next and generating dynamic pages from there, like Perl, PHP or ASP. All will work, but it's easiest in PHP if you have it available.