just a side note to the above you will need to add the ? example $page=$PHP_SELF."?".$_SERVER['QUERY_STRING'];