ok my butt is getting kicked now, I am trying to pass a variable from my foreach loop to use with rest of my code. here is a sample:

session_start();
$errorMessage = '';
if (isset($POST['txtUserId']) && isset($POST['txtPassword'])) {
include 'include/config.php';
include 'include/opendb.php';
$userId = $_POST['txtUserId'];

$password = $_POST['txtPassword'];
$str = "$password";

$arr1 = preg_split('//', $str, -1, PREG_SPLIT_NO_EMPTY);

$arr = $arr1;

//here is where i start the foreach loop

foreach ($arr as $value) {

$test=ord($value);

$test2=$test+10;

if($test2 > 122){
$test2=$test2+33;
$test2=$test2-122;

}

$test3=chr($test2);

} //end of foreach loop start rest of code how do i get the variable $test3 past this point

    Write a Reply...