I just finish to read the excellent article about the jokes program and I'm in the mood for programming My question is about http_referer. I create a "recommand this page to a friend" but I freeze with my http_referer code.

On my form I have $referer = getenv("HTTP_REFERER"); so now I'm ok, I have the referer but my problem is to insert this http_referer into my database. I need 2 script, so I cannot use the php_self. I have the form from which I get the http_referer and my other script recommand_it.php3 to insert the info into the table. But as soon that I press the submit button I have for referer the name of my form
I need a solution on how to fix my problem.
I someone know a good tips or sample code please let me know!