You are talking about two different things here. You encrypt a string (using whatever encryption scheme you want) and send it to the server ONLY when you are changing or adding passwords to an entry.
What you are talking about, I think, is SSL. For this you don't need to encrypt anything. Just make sure that PHP supports SSL, and you bind to a URL that's SSL specific. In this instance there is no "encrypting" to be done by you. It's handled at the ssl layer