php update password or save defualt if it is blank
<p>Can someone point me out how can I save the default password if it is blank?
Its an update issue. Im making an update page when the user update their profile.
Its a long profile info. I did not post it all here coz my only problem is the password field.
Even if it is leave as blank it still updating the field on the database.I use md5 for encryption. Below is the code. Please just add the code, your code. Thank you.</p>

<p>The id is=1 because im just testing it. Ill only have one data in the userstest table.</p>

<pre><code>    $desire= $_POST['desired'];//username field
    $password = md5(trim(mysql_prep($_POST['password'])));//password field
    $passconfirm = md5(trim(mysql_prep($_POST['confirmpassword']))); //confirmpasswor field
    $sql = mysql_query("UPDATE userstest SET username = '$desire',password='$password',confirmpassword='$passconfirm' WHERE id=1");
    if(mysql_affected_rows()==1){
    echo "Update Successfull";
    }else{
    echo "Update Failed" . mysql_error();
    }
</code></pre>
