There are 2 reasons this script won't work.
The 1st is that as you have the php in-line, and without any test to see if the fields have been populated, so you are running the query every time you load the page. If you had error reporting turned on the you would see a bunch of undefined index warnings.
The 2nd (can't believe I missed it earlier) is to do with case sensitivity, this line
If ($password == $password2) {
should read
If ($Password == $Password2) {
I have attached a revised version of your form.
However it needs work on it's security aspect, by at least using [man]mysql_real_escape_string/man.