show incorrect code entered for db coupon discount
Setting up message "The coupon code you entered is not correct, please re-enter your code." for a database coupon code. Here is what I did:
1. Set up session as described in forum support showthread.php?t=19042&highlight=wrong+coupon+code+entered
Here is my session variable for the incorrect coupon code entered:
<?php
if (!session_id()) session_start();
if("" == "") {
$_SESSION["realCode"] = "txtPromoCodedb";
}
?>
Here is my basic session variable for discount rule:
<?php
if (!session_id()) session_start();
if(!($totalRows_rsCoupondb == 0)) {
$_SESSION["PromoCodedb"] = "".((isset($_POST["txtPromoCodedb"]))?$_POST["txtPromoCodedb"]:"") ."";
}
?>
Here is the code to show if the code is entered incorrectly:
<?php if(isset($_SESSION['promoCodedb']) && isset($_SESSION['realCode']) && ($_SESSION['PromoCodedb'] != $_SESSION['realCode'])) { ?>
the promo code entered did not match our code. Please check and re-enter your code.
<?php } ?>
On my testing server when I enter an incorrect code, I am not getting the message. Is my session incorrect?
Thank you,
K