codice:
$qstr = $_SERVER['QUERY_STRING'];

if ($qstr) $qstr .= "&var=ciao";
else $qstr .= "var=ciao";

print 'vai';