title: How to encrypt/decrypt data in php?
body: <p>I'm currently a student and I'm studying PHP, I'm trying to make a simple encrypt/decrypt of data in PHP. I made some online research and some of them were quite confusing(at least for me).</p>
  
  <p>Here's what I'm trying to do:</p>
  
  <p>I have a table consisting of these fields <strong>(UserID,Fname,Lname,Email,Password)</strong></p>
  
  <p>What I want to have is have the all fields encrypted and then be decrypted(Is it possible to use <code>sha256</code> for encryption/decryption, if not any encryption algorithm)</p>
  
  <p>Another thing I want to learn is how to create a one way <code>hash(sha256)</code> combined with a good "salt".
  (Basically I just want to have a simple implementation of encryption/decryption, <code>hash(sha256)+salt)
  </code>
  Sir/Ma'am, your answers would be of great help and be very much appreciated. Thank you++</p>