title: Stuck trying to decrypt AES 128 using mcrypt PHP
body: <p>I really need help, have spent hours trying to get this working to no avail.</p>
  
  <p>I have data encrypted with AES. </p>
  
  <pre><code>Block size = 128
  KeySize = 256
  Mode = CBC
  Padding = PKCS7
  </code></pre>
  
  <p>It comes as a POST to my script.</p>
  
  <p>What I have so far is:</p>
  
  <pre><code>$encrypted = $_POST;
  
  foreach ($encrypted as $k =&gt; $v) {
      $encrypted = trim($k);
  }
  
  $myKey = "FKQ5sTfotEDF7W07IpvyPFZ0IXeegs4b";
  
  $myIV = "RFajS7JcDJDuAGAT"
  
  $crypttext = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $myKey, $encrypted , MCRYPT_MODE_CBC, $myIV);
  
  echo $crypttext;
  </code></pre>
  
  <p>Doesn't work. What am I missing here?</p>