I am preparing a form on an external page using PHP. Is there a way to check the password entered in that form with the one in Marketing cloud? I used "AccountUser" object to get the password but it didn't show the password.
Pretty much all password based APIs will not return the value of the password that the user entered. Instead they store an encrypted version of the password such as a salted hash and when a login attempt is made they apply the same algorithm to the entered password and see if the result matches the stored value.
One reason for this is to stop someone who has hacked in from just being able to grab the passwords and start pretending to be real users.
Bottom line is that you should leave the job of checking the password to the system that manages the passwords i.e. make an API call to it to check or get it to present the authentication UI e.g. via OAUTH. (Not sure what the appropriate choice is for Marketing Cloud.)