In your "register.txt", in your form you have multiple "<input type="unit" id="unit" name="unit" ..... placeholder="unit" required />" inputs.
First: "unit" is not a valid value for the "type" attribute of an input...( see: http://www.w3schools.com/tags/att_input_type.asp )
Second: All form inputs must have a unique "name" attribute ( the first unit input might have a value, but the second one which may have none will overwrite it in the POST processing variables).
Third: You have the same thing going on with your select boxes sharing the same "name" values.
I did not look into your processing script since these issues might explain why you are getting blank values when echoing them. After you get the form cleaned up with unique inputs then we can look at the processing if necessary.