Organizing an old site

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
irishmike2004
Forum Contributor
Posts: 119
Joined: Mon Nov 15, 2004 3:54 pm
Location: Lawrence, Kansas

Organizing an old site

Post by irishmike2004 »

Greetings:

I was wondering about making a central login with PHP... the site uses PHP BB and already has therefore a MySQL database with login data inside it, is there an easy way to integrate the login (in kind of a portal fashion) for the entire site?

Thanks in advance,
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

you'll need to use the _sid and _data cookies along with their sessions table and _users table they use to work with the user interaction. That's about it. Sounds a lot easier than it can be.

Have a look through login.php and sessions.php.

You will probably want to modify the lang_man.php file and constants file so you can show where they are in the pages...
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

I have done something similar in the past, but in reverse order. when the user created an account on my site, I also created the phpBB account.

...if you need help on which tables to insert stuff, lemme know.

then on your login action page, you can set the cookie for phpBB so they don't have to log in twice.

Code: Select all

$tempcookie = array('autologinid'=>md5($_POSTї"password"]),'userid'=>$getfiї"user_id"]);
		setcookie("phpbb2mysql_data",serialize($tempcookie),time() + 31536000,"/");
Burr
irishmike2004
Forum Contributor
Posts: 119
Joined: Mon Nov 15, 2004 3:54 pm
Location: Lawrence, Kansas

cool

Post by irishmike2004 »

Thanks for the input on this... I think it will work out pretty good with the cookie idea... thx burrito.

Mike
Post Reply