title: Passing Hidden Form Data in a session post
body: <p>I have to submit this form to a payment processing gateway on my PHP page. All the credit card payment information will be taken on the next screen but the gateway needs the "HostedKey" and "Gateway_ID" need to be invisible from public code view as well.</p>
  
  <pre><code>&lt;form action="nextpage.php" method ="POST" target="_blank"&gt;
  Patient Account Number:
  &lt;input type="text" name="CustRefID" id="CustRefID"&gt;
  
  &lt;input type="hidden" name="HostedKey" id="HostedKey" value="ZZZZZZ" /&gt;
  &lt;input type="hidden" name="Gateway_ID" id="Gateway_ID" value="XXXXXX" /&gt;
  
  &lt;input type="hidden" name="IndustryCode" id="IndustryCode" value="2" /&gt;
  &lt;input type="hidden" name="Amount" id="Amount" value="" /&gt;
  &lt;input type="hidden" name="RecurringType" id="RecurringType" value="N" /&gt;
  &lt;input type="hidden" name="RecurringAmount" id="RecurringAmount" value="" /&gt;
  &lt;input type="hidden" name="CURL" id="CURL" value="back to my site" /&gt;
  &lt;input type="hidden" name="AVSRequired" id="AVSRequired" value="Y"/&gt;
  &lt;input type="hidden" name="CVV2Required" id="CVV2Required"value="Y"/&gt;
  &lt;input type="hidden" name="EmailRequired" id="EmailRequired" value="Y"/&gt;
  &lt;input type="hidden" name="PostRspMsg" id="PostRspMsg" value="Y"/&gt;
  &lt;input type="hidden" name="SECCode" id="SECCode"  value="1" /&gt;
  &lt;input type="hidden" name="Descriptor" id="Descriptor" value="Online" /&gt;
  &lt;input type="Submit" name="Submit" id="Submit" value="Pay Online Now" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I tried something like this. It hid the Key and ID but the form did not pass on the hidden session variables.</p>
  
  <pre><code>&lt;strong&gt;Patient Account Number: &lt;/strong&gt;
  &lt;form action="nextpage.php" method"post"&gt;
  &lt;input type="text" name="CustRefID"/&gt;
  &lt;input type="hidden" name="HostedKey" id="HostedKey" value="" /&gt;
  &lt;input type="hidden" name="Gateway_ID" value="&lt;?php ($Gateway_ID); ?&gt;" /&gt;
  &lt;input type="hidden" name="HostedKey" value="&lt;?php ($HostedKey); ?&gt;" /&gt;
  &lt;input type="submit" name="Submit" value="Submit" /&gt;
  &lt;/form&gt;
  
  &lt;?php
  if (isset($_POST['Submit'])) 
  { $_session['CustRefID'] = $_POST['CustRefID'];} 
  { $_session['HostedKey'] = $_POST['xxxxxx'];} 
  { $_session['Gateway_ID'] = "zzzzzz";} 
  
  ?&gt; 
  
  &lt;strong&gt;&lt;? echo $_session['CustRefID'];?&gt;&lt;/strong&gt;
  </code></pre>
  
  <p>Any help would be great. My programmer is out sick...</p>