Page 1 of 1

Login form site integration

Posted: Sun Feb 11, 2007 1:56 am
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.

Posted: Sun Feb 11, 2007 2:55 am
by Brf
Just direct your form to login.php and have it redirect whereever you want.

Posted: Sun Feb 11, 2007 4:26 am
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?

Posted: Sun Feb 11, 2007 5:42 am
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.

Posted: Sun Feb 11, 2007 3:32 pm
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.