Welcome Guest, Not a member yet? Register   Sign In
How to display corpname first, if no corpname, then username?
#2

(This post was last modified: 01-19-2021, 09:22 AM by paulbalandan.)

PHP Code:
<?php echo $this->session->userdata('corp_name') ?: $this->session->userdata('user_name'); ?>

This works on the assumption that both session data returns strings, and if 'corp_name' is not given it will return an empty string.
Reply


Messages In This Thread
RE: How to display corpname first, if no corpname, then username? - by paulbalandan - 01-19-2021, 09:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB