Logically, this seems backwards, though it probably won't matter as long as you are consistent:
$xsidbpass = md5(mysql_escape_string($_POST['xsidbpass']));
You are hashing the password string after escaping it for use in the SQL. Theoretically, if the md5() were to output something that should not be used in SQL, then you could still have a query error. In reality, since md5() returns a 32-character hexadecimal number, it's not going to matter as far as SQL injection problems go. I just thought I'd point it out here for any future code, as logically the mysql_real_escape_string() should normally be the last thing you do to a string before outputting it to MySQL. Also, if the password has any characters in it that are escaped by mysql_real_escape_string, then there will be a difference in the hash depending on the sequence:
<pre><?php
$string = "This here's a test; y'all";
echo md5(mysql_real_escape_string($string)); // hash of mysql_escaped string
echo mysql_real_escape_string(md5($string)); // just hash of the string
?></pre>
Outputs:
34457a356e8de87c0c4247b46b0721cd
89baa6cdc51ff262bb3c55a70e7702cf