Simple login page for a project using PDO to connect with PHPBB

Converting from other board software? Good decision! Need help? Have a question about a convertor? Wish to offer a convertor package? Post here.
Post Reply
Durbatuluk
Registered User
Posts: 106
Joined: Thu Dec 29, 2005 8:22 pm

Simple login page for a project using PDO to connect with PHPBB

Post by Durbatuluk » Thu Jul 25, 2019 11:30 am

Hello, lets make some setup here:

1) Lets make a simple login page in PHP using PDO extension like that:

Code: Select all

$db_users = new PDO('mysql:host=127.0.0.1;dbname=users;charset=UTF8', 'root', 'password');
$auth = new Login;

Code: Select all

$stmt = $db_users->prepare("INSERT IGNORE INTO account (username, sha_pass_hash, email, locked) VALUES (:name, :pass, :email, 1)");
              $stmt->bindValue(':name', $name, PDO::PARAM_STR);
                  $stmt->bindValue(':pass', $pass, PDO::PARAM_STR);
                  $stmt->bindValue(':email', $email, PDO::PARAM_STR);
                  $results = $stmt->execute();
How can I implement into this simple PHP registration script also PHPBB users INSERT script? What do I need? I have the main registration script in root folder and forum in forum folder in the same machine on Linux system.

1) How to implement it inside the script?
2) How would look like the password change script?
3) Can I copy with some SQL query all users which were already registered like that into PHPBB?

Thank you.

Post Reply

Return to “[3.2.x] Convertors”