I'm sorry the code I posted caused you so much trouble, but, for pete's sake, it was only a couple of typos. Both of them are pretty obvious and easily corrected by someone willing to spend 30 seconds looking for them (with the error messages as big clues), and especially by someone reading it to figure out how it's supposed to work and not merely copy-pasting with crossed fingers.
As for "$promo_value", that's the name of the variable you used in your original code ( $promo_value = $_POST['txtPromoCode']; ). I didn't really see any need to repost all your code.
Replace your bold code with this:
if(!($bol_form_error == 0) && (strlen($_POST['txtPromoCode']) > 1)) {
$promo_value = $_POST['txtPromoCode'];
$fp = fopen('fees/promo.cfg', 'r');
$bol_form_error = true;
while (!feof($fp)) {
$promo_line = strtolower(trim(fgets($fp)));
if ($strtolower($promo_value) == $promo_line);
$bol_form_error = false;
break;
}
fclose($fp);
if ($bol_form_error) {
$str_form_error = '<p class="form-error">Error: Please enter a valid promotional code.</p>';
}
}
If it doesn't work, check for typos, then look for a problem elsewhere with your posted values.