Using php code in a seperate webpage, is it possible to read the user name that is presently logged in?
On a separate webpage you cannot access other domain cookies and any info from other site is not available.
This would be in the same domain as amember. I would like to create a mysql database and use the user name as the key field in this database. Is it possible to retrieve the user name?
<?php session_start(); $member_id = $_SESSION['_amember_user']['member_id']; ?> I recommend use numeric member id instead of login.
Thanks for the info. It looks like you are using sessions. Is there any situition that the above code would not work?
yes, if you change session settings in your script, or jump between www.yoursite.com/url and yoursite.com/url