Bad news, my last post work around did not work.
Let me explain what going on. The user runs securteEmail.php which is a form that sends an email with a random 4 digit code to the users email. The user reads his email and inserts the code sent to his email in the secureEmail.php form, which invokes the action file SCAction.php. The code in the form is successfully sent and read by SCAction.php. Tthe problem, the original code has to be compared to the email code. There for has to be sent to SCAction.php. The email code entered in the form is read from the form by SCaction.php. I need the action code to fetch the users email code that is entered.
**** The secureEmail.php code: ****
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Seurity Email Service</title></head>
<body>
<?php
$SC2 = $input[$rand_keys[0]];
echo "SC code sent = ", $SC2, "<br>";
echo "After the SC code is sent to the Email, we are at the Form <br>";
?>
<FORM METHOD="POST" ACTION="SCAction.php/?cmd= set&var1=$SC2">
<H2>Security Code Service</H2>
<p>Enter the Security Code from the recipient's Email & Submit </p>
<?php $Scode = substr("$Scode", 0, -4); ?>
<INPUT NAME="Scode", value = <?php echo (""); ?> >
<!-- <input type="submit" /> -->
<?php
$Scode = $_POST['Scode'];
Echo "Scode = $Scode <br>";
echo "<br>Security code (SC = $SC)";
echo " sent to ", $to_address, "<br>";
?>
</FORM>
</body>
</html>
****The SCAction.php code:****
<?php
if(isset($_GET['$SC'])){
$SC=stripslashes($_GET['$SC']);
}
Echo "SC = $SC <br>";
$Scode = $_POST['Scode'];
Echo "Scode = $Scode <br>";
if ($SC === $Scode) {
echo "Success, this is the Security Code from the Email : {$_POST['Scode']}<br />";
} else {
echo "<br>Illegal Security Code from the Email <br>";
}
?>