maxic0 Posted April 5, 2007 Share Posted April 5, 2007 Hi, iv been trying to do this for a while, link my website users with phpBB forum users so they only need to register once. Now someone was kind enough to give me this code to get the users information: <?php define('IN_PHPBB', true); $phpbb_root_path = './forum/'; include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'common.' . $phpEx); $userdata = session_pagestart($user_ip, PAGE_INDEX); init_userprefs($userdata); ?> So now all there information will be stored in the $userdata variable. To show there information on the page a put it in a while loop. <?php define('IN_PHPBB', true); $phpbb_root_path = './forum/'; include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'common.' . $phpEx); $userdata = session_pagestart($user_ip, PAGE_INDEX); init_userprefs($userdata); echo $userdata; while (list ($data) = each ($userdata)) { echo "$data <br/>"; } ?> The problem is that this echos out all the names of the fields where the information is.. Arrayuser_id user_active username user_password user_session_time user_session_page user_lastvisit user_regdate user_level user_posts user_timezone user_style user_lang user_dateformat user_new_privmsg user_unread_privmsg user_last_privmsg user_login_tries user_last_login_try user_emailtime user_viewemail user_attachsig user_allowhtml user_allowbbcode user_allowsmile user_allowavatar user_allow_pm user_allow_viewonline user_notify user_notify_pm user_popup_pm user_rank user_avatar user_avatar_type user_email user_icq user_website user_from user_sig user_sig_bbcode_uid user_aim user_yim user_msnm user_occ user_interests user_actkey user_newpasswd session_id session_user_id session_start session_time session_ip session_page session_logged_in session_admin How do i echo out their actual information? And how would i echo out certain fields, username for example? Thanks! Link to comment https://forums.phpfreaks.com/topic/45757-linking-a-page-with-phpbb-forum/ Share on other sites More sharing options...
maxic0 Posted April 5, 2007 Author Share Posted April 5, 2007 Nevermind i was told how to do it. For anyone whos as stupid as me i just had to put: <?php echo $userdata['username']; ?> Link to comment https://forums.phpfreaks.com/topic/45757-linking-a-page-with-phpbb-forum/#findComment-222275 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.