Correct, you don’t need to store the 2nd copy of the password. I also noticed another issue and you would not get any output is this line:
if (isset($\_GET['register'])) { // code inside }
You’re not sending a key-value pair named “register” so that will be false and your script just quits without it. You will need to add like a ®ister=1 to your URL on the Corona side or remove that if statement and matching/ending curly brace.
Rob