They've complicated it by writing ajax and assuming that has something to do with PHP.
Input Id's are not provided to PHP as HTML doesn't consider them values upon success. Autocomplete.php will only have access to $_GET['user'] since the JS doesn't provide it with any other value. Result.php cannot read $_GET['user'] nor $_GET['tag'] as neither are provided. You will find a $_POST['tag'], but no corresponding user offset.
Choose either GET or POST method and stick with it for every step. If you use GET, than you can add the user to the form action as a querystring. If you choose post and don't want to mix get, than you can pass it to the form as a hidden input. IMO it'd be easier to do this and use the JS to iterate the field's within the form to build its post request.
header('HTTP/1.1 420 Enhance Your Calm');