You can't do this with javascript. You can think of javascript as "real-time" and can only do "jobs" that are not related to the server. So you can't save anything, change anything etc that has to do with the server. Having a register page with username and password stuff that need to be saved is something that requires the server, and should be programmed in ASP or PHP.
If you ask me, doing this is quite easy (in PHP).
So once you've gotten javascript down pat, try your hands at PHP. Don't make yourself depend on other peoples codes and sniplets. Javascript for example, is a programming language, and is suppost to be used as a programming language rather than a liberary full of snipplets that you don't know how to edit or change.