title: Security when writing a PHP webservice?
body: <p>I am writing a web service in PHP for the first time and had ran into some security problems.  </p>
  
  <p>1) I am planning to hash passwords using md5() before I write them to the database (or to authenticate the user) but I realize that to do that, I would have to transmit the password in plaintext to the server and hash it there.<br>
  Because of this I thought of  md5()ing it with javascript client side and then rehashing on the server but then if javascript is disabled, then the user can't login, right?  </p>
  
  <p>2) I have heard that anything that when the action is readonly, you should use GET but if it modifies the database, you should use POST. Isn't post just as transparent as GET, just not in the address bar?</p>