the problem is code order.
the code to set the session variables is at lines 13 - 24:
<?php
if (!session_id()) session_start();
if(!($totalRows_rs_coupon == 0)) {
$_SESSION["PromoCode"] = "".$row_rs_coupon['code_vch'] ."";
}
?>
<?php
if (!session_id()) session_start();
if(!($totalRows_rs_coupon == 0)) {
$_SESSION["PromoAmount"] = "".$row_rs_coupon['amount_vch'] ."";
}
?>
this is before the code to create the recordset which is at line 76 - 80, since the recordset does not exist yet when the session is being set, the session is set to a blank value.
move the set session value code so it is after the recordset code.