The below should work, but it's 4am here:
PHP Code:
$query = "INSERT INTO " . TABLE_PREFIX ." participants (fieldname, fieldname)
VALUES ("' $gamertag . '", "' . $eaddress . '")";
Also, you should use some of vBulletin coding standards. Such as santizing variables with $vbulletin->input->clean_array_gpc() and you don't have to connect to a database if your using this a vbulletin hack. (Since you would be including global.php)