SELECT * FROM test WHERE first='$first'

i’m trying to make my updater do this, where it checks two variables. i got it to check this and show the update page:
[size=1]http://www.templarian.com/test/update.php?first=name[/size]
,but it doesnt work with this:
[size=1]http://www.templarian.com/test/update.php?first=name?last=lastname[/size]

heres the code i’m using (this works for the first links setup):

mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM test WHERE first='$first'";
$result=mysql_query($query);
$num=mysql_numrows($result); 
mysql_close();

thanks.