$post[joindate]=vbdate($registereddateformat,$post[joindate]);
if ($post[fieldx]=="") { $badge = ""; } else { $badge = "<img src="$post[fieldx]">"; }
// display user info
if ($userinfo[fieldx]=="") { $badge = ""; } else { $badge = "<img src="$userinfo[fieldx]">"; }