Basically, what I'm wanting to do is redirect to my banking gateway Perl page if I've verified all the POST variables. Using the regular redirecting method of
echo '<meta HTTP-EQUIV="REFRESH" content="0; url=../cgi-bin/my_bank.pl">';
isn't working because it doesn't pass the POST variables to the Perl Page.
This is an abbreviated form of my current code:
if (isset ( $_POST ['submit'] ))
{
// Check incoming required variables
$error_messages = array ( );
if (! isset ( $_POST ['Required_Variable'] ) || ($_POST ['Required_Variable'] == ' ') || ($_POST ['Required_Variable'] == '')) {
$error_messages ['Required_Variable'] = 'Please provide this required variable.';
$_SESSION ['Required_Variable'] = '';
} else
$_SESSION ['Required_Variable'] = $_POST ['Required_Variable'];
$Required_Variable = $_SESSION ['Required_Variable'];
/* Repeat for all require variables and those needing verification */
}
if ((isset ( $_POST ['submit'] )) && (count ( $error_messages ) < 1)) {
// Process Credit Card!
echo '<meta HTTP-EQUIV="REFRESH" content="0; url=../cgi-bin/my_bank.pl">';
} else {
// Display form
echo '<form class="app" action="' . $_SERVER ['PHP_SELF'] . '" method="post">';
?>
<table border=0 width=100%>
<TR>
<td><span class="required">*</SPAN> Required fields</td>
</tr>
</table>
<table border=0 width=100%>
<TR>
<TD align=right width="25%"><font face="Arial" size="2"><span class="label">Required Variable:</span><span class="required">*</span> </font></TD>
<TD><input type="text" name="Required_Variable" size="35" maxlength="35"
value="<?php echo $Require_Variable;?>"></TD>
</TR>
<?php
if (isset ( $error_messages ['Required_Variable'] ) && ($error_messages ['Required_Variable'] != '')) {
echo '<tr><td> </td><td><span class="ocerror-p">' . $error_messages ['Required_Variable'] . '</span></td></tr>';
}
echo '</table></form>';
I hope this explains what I'm trying to do better.