help with an If else clause

Hi, I am trying to create an if else clause that based on whether the database has information in a particular column a hyperlink will or will not be displayed.

I have currently done the following

<?php $pdf = $row_getProducts['part_pdf']; if ($pdf == "NULL" ) { echo "testing"; } else echo "" ?>

I have reversed the display so I can check it is working ie If NULL it will display testing! however when working I would swap this with the empty echo “”

I think it might be the first line that is the problem but dont know why. If anyone can help me it would be much appreciated.

Regards
Ross.

[php]<?php
$pdf = $row_getProducts[‘part_pdf’];
if ($pdf == NULL) {
echo “test”;
}
else echo “”;
?>[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service