<?php if(!defined('IN_INDEX')) { die('Sorry, you cannot access this file.'); } ?>
<?php
$vouch = mysql_query("SELECT * FROM cms_vouchers");
while ($voucher = mysql_fetch_assoc($vouch)) {
$username = $voucher['user_id'];
if(($_SESSION['user']['username']) == "$username") {
?>
<div id="page-content-text" class="left">
<div id="contentTitle" class="red">%hotel_name% Alert: Enter the voucher code <?php echo $voucher['code'] ?>
to receive <?php echo $voucher['smileys_points'] ?> </div>
</div>
<?php
}
}
?>
I need a little help with the code above to not return the voucher code once it has been used, From using a ENUM in the database table 0 for unused and 1 for used
Avicii 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.