If it's a variable you have set, like this:
$foo = "yabba dabba doo";
then that is fine.
If your URL is:
http://www.yoursite.com/search.php?foo=bar
and you are trying to access the "foo" variable, then you can access it one of two ways.
If registered_globals is on, then you can simply refer to the $foo variable, which has a value of "bar."
If it's off, then you retrieve the value with $_GET["foo"]. Your best bet here is to create a line:
$foo = $_GET["foo"];
Then you can refer to $foo throughout your script.
The thing to remember is that this page was reached from a previous form using the GET method. If you use the POST method, then the variable won't be visible in the URL. However, the same rules apply regarding registered_globals. If it's on, you can use $foo. If it's off, then you would use $_POST["foo"].
Hope that gets you pointed in the right direction.