its gonna be something like this:
print "Location: http://www.whatever.com/index.php?var1=$var1&var2=$var2\n\n";
but here's some cautions: first, this MUST go just like a header in php eg it must go before this:
print "content-type: text/html\n\n";
second, last \n\n are required.
cheers,
AlCapone