Since .php pages interpret HTML code the same way .html pages do, all you have to do is change the extension of .html to .php
Then in your form all you have to do is put this code:
Code:
<input type="hidden" name="referrer" value="<?php echo $_SERVER['HTTP_REFERER']; ?>" />
and you're all set!