Um, I may be wrong but you have a error half way into the script where you changed %password to $password. I'm going to guess typo. =x