You are printing out $goForIt before you assign it a value. You need to do all your PHP stuff first, and then print out HTML form tags.
I would also assume (though I dont know what the rest of your code looks like) that when you run the script for the first time, it doesn't work because $POST['password'] and $POST['username'] are empty because you haven't submitted the form yet. And when you submit the form, it doesn't work because it doesn't have an action assigned to it (since it depends on $POST['password'] and $POST['username'] values).