I suppose I could use PHP to access $_GET variables from JavaScript:
$_GET
I suppose you were thinking this:
...this would just be syntax-correction of your idea :)