Using php code in database value
I have a dynamically populated menu that populates the menu bar. It consists of the user-friendly name and the link to the page which are stored in the DB table. I would like for one of the menu items to display the logged-in user's name and I have entered <?php $_SESSION['username'];?> in the 'link' field of the DB. This variable is defined in the session variables, but instead of returning "davidg" it actually displays "<?php echo $username;?>" the previous server behaviors would actually run the php code. any suggestions?
For the attached image - the left is the database returned menu item, the right is hard-coded to return of the user's email.