Display Button for more if paid record

3 posts by 2 authors in: Forums > CMS Builder
Last Post: December 4, 2009   (RSS)

Re: [Liz1001] Display Button for more if paid record

By Dave - December 4, 2009

Hi Liz,

It looks right, but for records that were created _before_ you added that field they'll have a value of null (or blank) for "level". You can actually just test the variable by itself to see if it contains a value that isn't zero or blank. Try this instead:

<?php if ($record['level']): ?>
<a href="<?php echo $record['_link'] ?>"><img src="images/more_information.jpg" width="109" height="26" hspace="40" vspace="10" /></a>
<?php else: ?>
Sign Up

<?php endif ?>


If that doesn't work, have a look to see what the value is for level with this debugging code:
Level value is '<?php $record['level'] ?>'<br/>

Let me know if that works for you!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Display Button for more if paid record

By Liz1001 - December 4, 2009

Dave that worked perfectly! Makes sense as that filed was added after the listings were created. thanks.