Skip links

How to show part of a webpage if a recordset condition is true

January 13, 2011

With a neat bit of php of course! Using the code below you can reveal a section of your page when your recordset’s (yourrecordset) table row (tablerow) is equal to a certain result. I used this to reveal a ‘New Product’ image over the top of a product if the content of the recordset result matched what was‘yourconditionhere’.

<?php if ($row_yourrecordset[‘tablerow‘]==”yourconditionhere“){ ?>
Hello World!
<?php } ?>

chris-parker
This website uses cookies to improve your web experience.
chris-parker

Send me a message.

Happy to answer any question you may have.

chris@chrisparkerdesign.co.uk

07813 311253

    Your Name (required)

    Your Email (required)

    Subject

    Your Message

    CHRIS PARKER DESIGN

    chris@chrisparkerdesign.co.uk

    07813 311253