WebEngine's 6th Anniversary

On December 19th, 2018 we will be celebrating 6 years of WebEngine CMS!
The event is here!

1.0.9.6 Register customization

ozon

New Member
#1
Hello, I would like to connect my Register form from website with database of my forum.

So could someone write me a code which
- will create account in MuOnline database - it's in webengine
and in this same time
- will create account in Forum database
Information of database
hostname: localhost
type: mysql
username: login
password: pass
databasename: Forum
table: forum_login
In table I've got username, password, email

I hope someone would be so kindly and will help by making ready file to input in webengine :)
 

ozon

New Member
#3
Just in time :) I'm using MyBB

You made it for 1.0.7 so it's little complicated but I will try to do it even that
 
Last edited:

ozon

New Member
#4
OK so maybe little help, I don't want to do something big so you helped me that I should work with class.common and I found there
$query = "INSERT INTO "._TBL_MI_." (memb___id, memb__pwd, memb_name, sno__numb, mail_addr, bloc_code, ctl1_code) VALUES :)username, :password, :name, :serial, :email, 0, 0)";

so I made it (Im using MyBB so there is some difference than I wrote in post):
$query = "INSERT INTO "mybb_users" (username, password, email) VALUES :)username, :password, :email, 0, 0)";
But how to wrote in that query that should connect not to SQL database but to:
$config['database']['type'] = 'mysqli';
$config['database']['database'] = 'MyBB';
$config['database']['hostname'] = 'localhost';
$config['database']['username'] = 'login';
$config['database']['password'] = 'pass';
 
Top