I found the information on this but have lost it now. How can we display the username "login name" of a customer on a page in our protected folders?
Are you talking about within aMember pages, or other pages on your site? For aMember pages you use: First Name: {$smarty.session._amember_user.name_f} David
So I added This Code: <?php session_start(); ?> to the top of my html page and this Code: <?php print "$_SESSION['_amember_user']['login']"; ?> in the middle. It made my page completely blank when loaded...my apache is set up to process php in html files and works great except when I add the second snippet of code. What gives?
Do you have access to your php.ini? change php.ini setting display_errors to On Restart apache then test again and copy/paste error that you got.
So after I enabled the php errors I saw and fixed the issue. Working on my new site, i get this printed on the web pages instead of the data itself. Array[name_f] [name_l] here is what my code looks like... Top of page: Code: <?php session_start(); ?> In the body: Code: <?php print "$_SESSION[_amember_user][name_f] [name_l]"; ?> The code is stuck between <div> tags....would this matter? How would I fix the issue?
This is not correct syntax. use this: Code: <?php print $_SESSION['_amember_user']['name_f']." ".$_SESSION['_amember_user']['name_l']; ?>
Thanks... Next question, I noticed that [_amember_user] is linked to the mysql table 'amember_members' If I wanted to pull data from other tables within the amember database, where and how would I link to those tables? Thanks, Chris
This depends what data and where exactly you need it. By default aMember set these session variables: $_SESSION['_amember_user'] $_SESSION['_amember_product_ids'] $_SESSION['_amember_products'] $_SESSION['_amember_subscriptions']
I would like to display, on a PHP file, the list of products a user has subscribed to. I would like for each product name to be a hyperlink to the product URL. Basically looking for identical behavior to what you see on the member.php page. Any suggestions?
This works to get the products the user is subscribed to, hperlinked to the product URL: Code: <? foreach ($_SESSION['_amember_products'] as $p){ print "<a href='".$p['url']."'>".$p['title']."</a><br />"; } ?>