meanster99
Well-known member
Hi,
I wanted to add the current username into the homepage somewhere. I would love to do this with an HTML custom page if possible, but I'm not sure it is? I looked at creating a custom PHP page for it and read the example.php, and enabled custom php pages in config.php. The example.php says that I can add:
[pre]
$_SESSION['logged_user_infos_ar']["username_user"]
[/pre]
However, when I tried adding it, nothing appeared. I'm a noob when it comes to php, but this is what I wrote and nothing appeared:
[pre]
<?php
echo $_SESSION['logged_user_infos_ar']["username_user"];
[/pre]
What am I doing wrong please? Ideally, I'd like to actually display the values in 'first_name_user' and 'last_name_user', rather than the username itself. How would I do that? Could I just change it to $_SESSION['logged_user_infos_ar']["first_name_user"]["last_name_user"]? What is the correct syntax to use in PHP?
Thanks,
Matt
I wanted to add the current username into the homepage somewhere. I would love to do this with an HTML custom page if possible, but I'm not sure it is? I looked at creating a custom PHP page for it and read the example.php, and enabled custom php pages in config.php. The example.php says that I can add:
[pre]
$_SESSION['logged_user_infos_ar']["username_user"]
[/pre]
However, when I tried adding it, nothing appeared. I'm a noob when it comes to php, but this is what I wrote and nothing appeared:
[pre]
<?php
echo $_SESSION['logged_user_infos_ar']["username_user"];
[/pre]
What am I doing wrong please? Ideally, I'd like to actually display the values in 'first_name_user' and 'last_name_user', rather than the username itself. How would I do that? Could I just change it to $_SESSION['logged_user_infos_ar']["first_name_user"]["last_name_user"]? What is the correct syntax to use in PHP?
Thanks,
Matt