Followed instructions here: http://manual.amember.com/Integrati...ceipt_3._Add_Member_Data_to_Your_Website_Page However using that code does not work. All that appears is "Welcome," and the rest is blank. Any ideas? Or is there an example PHP page to take a look at to see if anything is wrong with mine?
Are you adding it to an HTML or PHP page? If it is PHP, make sure you have the <?php session_start(); ?> at the beginning of your file.
Hi, yes to a php page and I do have that at the start of the page. Here is an example of the test.php page I created (stripped it down to this and it still didn't work): PHP: <?php session_start(); ?> <font face="Georgia" size="5"><?phpprint "Welcome, " . $_SESSION['_amember_user']['name_f'] . " " . $_SESSION['_amember_user']['name_l'];?></font> Should I be putting something else into the .php page?
Its possible the session data isnt getting read. Could be a server issue. What does print_r($_SESSION); display? Some other threads: http://www.amember.com/forum/showthread.php?t=13225 http://www.amember.com/forum/showthread.php?t=1174 David
Hi David, print_r($_SESSION): displayed: "Array ( )" and that was it. Looked at the first thread, but I'm honestly kinda lost what it was even talking about, and the second thread was restricted so I couldn't see it. Is there something I should be adding to my php page? This php page is only in the protected directory...it's not in the amember script directory. Thank you again for everyones help!
@alanpeto: what are you using to server your content? (wordpress, etc) Could be that your content script is potentially clearing your session data?
Hi skippybosco, The php page is just a regular php page only to display this content as a landing page in the secure directory. There are other sub-directories within this directory, but they have no impact on that page. No other content on that page / script that would impact it. I even created a clean php page with just the recommended code (see first post) and still...nothing. Confused
Create test.php script inside the same folder where you have your script with code: PHP: <?php phpinfo(); ?> This will display php settings. Check settings from session section and make sure that they exactly the same as in aMember CP -> Version Info.
Hi Alex, They are not...local values as shown in amember are 'on' for session.bug_compat_42 (off in test.php), and session.cookie_domain shows the domain in amember, but no value in test.php. Everything else looks the same in both. Is there something I need to do in amember? Thank you in advance for your help!
Can you provide two screenshots of session settings on both pages? You can do this in helpdesk if don't want to post these settings in the forum.