Update register.php

- Correct previous commit when it was impossible to set any value anymore (oooops, I went too quickly on this one)
- Use .val instead of .attr("value") because the latter is deprecated