copied over and added a few lines to the register.php file from the eTendence file.