with php it would only be possible if you reload the page. it's much more common though doing it with javascript I think. simply look at the source of a page where you see it to learn how it is done, or browse around at hotscripts.com, they've got a javascript section, too.