First thing you should do is read over this manual page: [man]security.globals[/man].
Once you've finished that, you'll know exactly what register_globals, why doing that is bad, and what you should be doing instead. For reference, you might want to take a look at this manual page afterwards: [man]reserved.variables[/man]. Those "superglobal" variables are the ones you'll be referring to, e.g. $_POST['username'] rather than $username.
You should also feel free to post your script in the Code Critique forum - I've learned (and helped teach, I hope) lots of ideas/methods over there.