Current User info hiding a row
-
I have a table that is showing some of the current user info for someone who is logged in. The problem is, if the info is not there or the field is blank I want the entire row not to be shown. Such as Middle Name. If the middle name is not there or is empty I want it to be show like this.
First Name: Blah
Last Name: Blahasand not
First Name: Blah
Middle Name:
Last Name: BlahasThe code I have is
<?php global $current_user; get_currentuserinfo(); echo 'Relationship to Employee:' . $current_user->dep1_relationship . "\n";?><br> <?php global $current_user; get_currentuserinfo(); echo 'First Name:' . $current_user->dep1_firstname . "\n";?> <?php global $current_user; get_currentuserinfo(); echo 'Middle Name:' . $current_user->dep1_middlename . "\n";?> <?php global $current_user; get_currentuserinfo(); echo 'Last Name:' . $current_user->dep1_lastname . "\n";?><br> <?php global $current_user; get_currentuserinfo(); echo 'SSN:' . $current_user->dep1_social . "\n";?><br> <?php global $current_user; get_currentuserinfo(); echo 'Date of Birth:' . $current_user->dep1_dob . "\n";?><br> <?php global $current_user; get_currentuserinfo(); echo 'Gender:' . $current_user->dep1_gender . "\n";?><br> <?php global $current_user; get_currentuserinfo(); echo 'Student:' . $current_user->dep1_student . "\n";?><br> <?php global $current_user; get_currentuserinfo(); echo 'Add of Cancel:' . $current_user->dep1_addorcancelcoverage . "\n";?><br>
Thank you for your help.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Current User info hiding a row’ is closed to new replies.