Your form did not have the encoding type set to multipart/form-data:
<form action="HDWRegistrationAndLogin/RegistrationAndLogin.php" method="POST" name="form" id="form" onSubmit="return HDW_validate_registration(this)">
should be:
<form action="HDWRegistrationAndLogin/RegistrationAndLogin.php" method="POST" name="form" id="form" onSubmit="return HDW_validate_registration(this)" enctype="multipart/form-data">
in the future, please do not paste the entire page code into your message. Instead compress the origianl php page into a zip archive and attach the zip file.