If you are using php 4.2.1 then you need to add this line for each variable passed with the URL:
$userID = $_GET["userID"];
This should work.
Just noticed that you did not close off your href with double quotes. should be:
<a href="file2.php?userID=<?php echo $userID ?>">VIEW</a>
or a shortcut would be like this:
<a href="file2.php?userID=<?= $userID?> ">VIEW</a>
Good luck