hi guys im completely new to this but amember is great !! can anyone tell me how i can display a members name on a page..like when a member logs in and they goto the members area it displays a message and there name on the page like "Hello bob" or whatever there member name is. and also is there a way for me to display on my main page how many people are members..like a sortof users online counter i want to display a message like "we have ?? members" can this be done and how would i do it please. i know a little about php so maybe i could use that but im not sure of the commands i would use to get the information from aMember. thank in advance.
Yes, it is possible and described in the aMember Pro manual (see "Customization" chapter). it will work in Free version as well. Yes, it is also possible in Pro version, but requires some PHP knowledge. It will look like: PHP: <?php require_once('/home/yourweb/public_html/amember/config.inc.php'); $q = $db->query("SELECT COUNT(*) FROM {$db->config[prefix]}members WHERE status > 0"); list($c) = mysql_fetch_row($q); echo "<br>We have $c members<br>"; ?> Of course, /home/yourweb/public_html/amember/ must be replaced to actual path to your aMember folder (can be see at aMember CP -> Info )
another question please thank you so much for that, i know how to do it now and i read the manual you said and its helpin alot. i have one more thing im having trouble with though and im not sure it can be done. i need to add a new field in a members profile i know how to do this thanx to the manual ..but i need to write to that field..i meen i needa to be able to save information for that field for that particular member. im making a plugin that allows people to click on a box beside a product item and i display the total cost of all items clicked on that page in a box in the corner ...i need to be able to save that information in there profile....r u confused? lol how can i automatically update the information in a field without them having to manually enter it..do you see wat i meen?