How do I pass a variable via drupal_goto()?
Assume your url is like in this example:

http://example.com/somepage?param1=val1&amp;param2=val2


In that case you can take values of param1 and param2 like so:

$param1 = $_GET['param1'];
$param2 = $_GET['param2'];


You may use this parameter for drupal_goto as

drupal_goto("path_here", array("param1" =&gt; $param1, "param2" =&gt; $param2));


For Drupal 7:

As YPCrumble says you need to use this code:

drupal_goto("path_here", array("query" =&gt; array("param1" =&gt; $param1, "param2" =&gt; $param2)));


For more details, refer to the API Documentation.