Ciao ho bisogno di aiuto di questo codice PHP

Codice PHP:

<?php session_start();

include 
'databaseconnectinfo.php';

$username $_POST['username'];
$password $_POST['password'];
$newpassword $_POST['newpassword'];
$confirmnewpassword $_POST['confirmnewpassword'];

$result mysql_query("SELECT password FROM users WHERE username='$username'");
if(!
$result)
{
echo 
"The username you entered does not exist";
}
else
if(
$password!= mysql_result($result0))
{
echo 
"You entered an incorrect password";
}
if(
$newpassword=$confirmnewpassword)
$sql=mysql_query("UPDATE users SET password='$newpassword' where username='$username'");
if(
$sql)
{
echo 
"Congratulations You have successfully changed your password";
}
else
{
echo 
"The new password and confirm new password fields must be the same";
}
?>

<h2><font face="Times New Roman" color="green">Change Your Password</h2>
<form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post">



[b]<font face="Times New Roman" size="2" color="green">User ID: <input type="text" name="loginName" size="10" maxlength="20" value="<?php if (isset($_POST['user'])) echo $_POST['user'];?>" /></p>


<font face="Times New Roman" size="2" color="green">[b]Current Password: <input type="password" name="password" size="10" maxlength="20" /></p>


<font face="Times New Roman" size="2" color="green">[b]New Password: <input type="password" name="password1" size="10" maxlength="20" /></p>


<font face="Times New Roman" size="2" color="green">[b]Confirm New Password: <input type="password" name="password2" size="10" maxlength="20" /></p>


<input type="submit" name="submit" value="Changeme" /></p>
<input type="hidden" name="submitted" value="TRUE" />
</form>


E questo è l'errore che mi da con quella scritta Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 5 in D:\Inetpub\webs\feelmeit\manageme.php on line 105

The new password and confirm new password fields must be the same

Io invece voglio che dica Congratulations You have successfully changed your password e deve cambiare password agli utenti del sito!!!


Devo finire il sito entro il 15!!! E grazie!!!