if/then statements in PHP within a WHILE loop

I have a WHILE loop where I would like an image to appear if the Promoter field equals “TRUE” – the Promoter field is an ENUM (‘TRUE’,‘FALSE’) – so I think it’s a text field instead of a real TRUE/FALSE field. Anyway, I cannot get it to work – the results always show the first line of code instead of the true results. Please review http://www.acpacenterstage.com/CenterStage/CenterTixManagers/rptArtists.php to see the results page. Here is the code:

<?php while ($Row = mysqli_fetch_assoc($Result)){ echo ''; echo '' . $Row['avID'] . '  '; if($Row['promoter'] = "FALSE"){ $pmessage = $Row['promoter']; } else{ $pmessage = 'CenterTix Promoter'; } echo $pmessage; echo '

'; echo $Row['ArtistName'] . ' 

'; echo '  '; echo ' '; echo ' '; echo ' '; echo ' '; } ?>

What am I doing wrong?

Mistake was :
[php] if($Row[‘promoter’] = “FALSE”){
$pmessage = $Row[‘promoter’];
}[/php]

Must be :
if($Row[‘promoter’] == “FALSE”){
$pmessage = $Row[‘promoter’];
}

=, asign value “FALSE” to valiable $Row[‘promoter’], if you want to compare you must use ==.

Sponsor our Newsletter | Privacy Policy | Terms of Service