$QUERY_STRING è la variabile server che ti da le query string appunto per cui tu combini le due

$PHP_SELF .$QUERY_STRING