title: decrypting salesforce custom field in php
body: <p>I am creating a signin page in php using heroku, I have created a  custom text(encryption) field in Salesforce which i want to decrypt in php in order to compare the user entered data with the decrypted data. How can i achieve this? Kindly help if anyone has solution for the same.</p>
  
  <pre><code>while ($row = pg_fetch_row($result)) {
      if (base64_decode($row[1]) == $_POST['password']) {
          echo "You are a validated user/n";
          echo "HELLO" . $_POST['email'];
          exit;
      }
  }
  </code></pre>
  
  <p>Code: </p>
  
  <pre><code>$query = "SELECT Email , Password__c FROM salesforce.contact ;"; 
  $result= pg_query($query); 
  $row = pg_fetch_row($result);
  echo "Row password " .$row[1]; 
  echo "&lt;br&gt;"; 
  echo "Post password " .$_POST['password']; 
  echo "&lt;br&gt;"; 
  </code></pre>
  
  <p>Output: 
  ($row[2]==>)Row password *********** 
  Post password 123456789
  <a href="https://i.stack.imgur.com/zoAQq.png" rel="nofollow noreferrer">enter image description here</a></p>