Jump to content

Search the Community

Showing results for tags 'bb3'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Donation Link

Found 1 result

  1. Hey guys, i have already created a log-in / register system for my website, and i am currently trying to integrate a web forum from phpBB3. i have installed the forum correctly and it is up and running just fine. what i am having an issue with is merging the register systems of both and matching the queries of each databases username and password.and am somewhat lost in watching a tutorial. i have my login logic: <?include('include/init.php'); // DB CONNECTION AND SESSION START .. etc // Redirects user if already logged in logged_in_redirect(); if (empty($_POST) === false) { $username = $_POST['loginname']; $password = $_POST['loginpass']; if (empty($username) === true || empty($password) === true) { $errors[] = 'You need to enter a valid Username & Password'; } else if (user_exists($username) === false ) { $errors[] = ' We could not find this user info in our userbase.'; } else if (user_active($username) === false ) { $errors[] = 'This account still needs to be activated or is no longer active'; } else { $login = login($username, $password); if ($login === false) { $errors[] = ' The Username / Password combination you entered is incorrect.'; } else { $_SESSION['user_id'] = $login; header("Location: index.php"); exit(); } } }else { $errors[] = 'No Data Retrieved'; } if (empty($errors) === false) { ?> <div style=" width: auto; height: 300px; margin: auto; padding: none; text-align: center; position: relative; top: 300px;"> <h5> We tried our best to log you in, but.. <? echo output_errors($errors); }?> Click <a href="redirect.php">Here</a> to go back to the login. </h5> </div> and my sessions logic in the INIT.php: ob_start(); if(!isset($_SESSION)) { session_start(); } error_reporting(E_ALL| E_STRICT); ini_set('display_errors', 1); require_once ('core/database/dbconnect.php'); require_once ('core/functions/general.php'); require_once ('core/functions/users.php'); require_once 'core/queries/dbqueries.php'; require_once ('forums/phpBB3/includes/functions.php'); $current_file = explode('/', $_SERVER['SCRIPT_NAME']); $current_file = end($current_file); if (logged_in() === true) { $session_user_id = $_SESSION['user_id']; $user_data = user_data($session_user_id, 'user_id', 'username', 'password', 'email', 'gender', 'country', 'month' ,'date' , 'year', 'pass_recover', 'type'); if (user_active($user_data['username']) === false){ session_destroy(); header('Location: index.php'); exit(); } if($current_file !== 'change_password.php' && $current_file !== 'logout.php' && $user_data['pass_recover'] == 1 ){ header('Location: change_password.php?force'); exit(); } } $errors = array(); ?> now i have uploaded my phpbb3 file and set them into a directory called forums and in this directory come a bunch of predefined functions. so i wanted to start to add the conditionals to check to see if it was finding the other forums register info i added this: } else { $login = login($username, $password); if ($login === false) { $errors[] = ' The Username / Password combination you entered is incorrect.'; } else {$find = mysql_query("SELECT * FROM phpbb_users WHERE username = '$username' "); ----| if(mysql_num_rows($find)==0) { | echo "ERROR"; | } else { | while ($find_row = mysql_fetch_assoc($find)){ | // THIS WHOLE SNIPPET HAS BEEN ADDED $password_hash = $find_row['user_password']; | } | echo $password_hash; | } ----| $_SESSION['user_id'] = $login; header("Location: index.php"); exit(); } } i had to go into the main functions of the and comment out this line of code so my page would show /*if (!defined('IN_PHPBB')) { exit; } */ nothing seems to output when i add these conditionals, and i at this point i am just lost as to how to get this task done. i can still login with a user who registered using the site / but typing in the username of a user who has registered via forum is not outputting anything. any suggestion or ideas ? i really would appreciate any help on this
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.