OK, well, like I said above since you're working in an existing vb script you need to do things the vb way, so I think what you want is this (but I haven't tried it):
Code:
if (empty($email))
{
$vbulletin->input->clean_gpc('p', 'email', TYPE_STR);
$email = htmlspecialchars_uni($vbulletin->GPC['email']);
}
Because the form is already set up to fill in the field with whatever's in $email. And the clean_gpc() function is used in vb instead of using $_GET[] directly.