mskr php block disappear if not filled in

hi

I made a php block that drags one of the members profile inputs, this one is called poem. 

$profileID = getID($_GET['ID']);

$aProfile = getProfileInfo($this->oProfileGen->_iProfileID);

$sNickName = $aProfile['NickName'];

$stitle  =  $aProfile['title'];

$spoem  =  $aProfile['poem'];

$scredit  =  $aProfile['credit'];

 

$html =<<<HTML

<div class="boxContent" style="padding:5px; text-align:center;">

<div class="clear_both"></div>

<div class="dbContent" style="background-image: url(http://www.tagshopstuff.com/sc_images/products/859_large_image.jpg);background-size:100% 100%;  margin-top: 20px;">

<div class="clear_both"style="height:10px;"></div>

<div style="color: ##3A0101!important;font-size: 16px;font-family: fantasy;">$sNickName's Writing</div>

<div class="clear_both"style="height:10px;"></div>

<div  style="color: ##3A0101!important;font-size: 14px;font-family: cursive;text-decoration:underline;font-weight:bold;">$stitle</div>

<div class="clear_both"style="height:10px;"></div>

<div  style="color: ##3A0101!important;font-size: 14px;font-family: cursive;text-align:left;font-weight:bold">$spoem</div>

<div class="clear_both"style="height:10px;"></div>

<div  style="color: ##3A0101!important;font-size: 14px;font-family: cursive;text-decoration:underline;font-weight:bold;">By: $scredit</div>

<div class="clear_both"style="height:10px;"></div>

 

</div>

HTML;

echo $html;

what I want to do now is make it so that if the person doesn't fill the field in then the whole block doesn't show on the profile. A bit like the profile fields. How can I do this?

Quote · 7 Jul 2015

Simple.

Right above this line.

$html =<<<HTML

Add this line.

if($spoem  == '') return;


A php block will not display if it returns nothing.


https://www.deanbassett.com
Quote · 7 Jul 2015
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.