Login form site integration

The 2.0.x discussion forum has been locked; this will remain read-only. The 3.0.x discussion forum has been renamed phpBB Discussion.
Locked
DelvarWorld
Registered User
Posts: 203
Joined: Thu Sep 04, 2003 10:56 pm
Location: noplarbp

Login form site integration

Post by DelvarWorld »

I want to include a login form, username/password box on an off-forum page to integrate my forum with my website. The login form is obviously easy enough, but what code do I need to make it so that the cookie is set and proper error handling is used? I've looked in login.php and there is a whole slew of code, and I'm not sure what specifically I would need to extract for a regular old login form.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51998
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Post by Brf »

Just direct your form to login.php and have it redirect whereever you want.

User avatar
Blaine
Registered User
Posts: 83
Joined: Mon Jan 15, 2007 3:07 pm
Location: Atlanta, GA

Post by Blaine »

Brf wrote: Just direct your form to login.php and have it redirect whereever you want.

Assuming that is done with a POST or GET method from the off-forum page, can you suggest what and how to set the variables for the login creditials and the redirect?

DelvarWorld
Registered User
Posts: 203
Joined: Thu Sep 04, 2003 10:56 pm
Location: noplarbp

Post by DelvarWorld »

But I don't want login.php to always direct to the same place. I don't want people logging in on the forum and people logging in on the site to both be directed to the same place.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

geocator
Registered User
Posts: 16242
Joined: Fri Jan 09, 2004 11:56 pm
Location: On dry land
Contact:

Post by geocator »

You could modify login.php to redirect depending on the where the login came from. You could also make a copy of login.php and call it something like loginsite.php and then change the redirects.

You can also add a hidden form element called redirect, although this sometimes works and sometimes does not.

Locked

Return to “2.0.x Discussion”