Take the 2-minute tour ×

How does one implement a multi-site login bar? I am starting a personal project that would require a header bar above multiple sites that allows users to login or do other things, I am coding this in PHP and have not been able to find anything online other than wordpress plugins.

EDIT: Sorry I wrote this late last night so I was very vague about it. I'll go into a bit more detail.

An example would be the StackExchange bar at the top, I will have one unified login database that each site will access.

I guess I just am curious how best to implement this via PHP or some MVC framework.

share|improve this question
Are the sites connected somehow, such as sharing databases? –  Ryan B Dec 10 '12 at 15:49
Have you looked at the related articles? 1, 2 –  Bondye Dec 10 '12 at 15:50
You are referring to SSO. Could you share an example of a "Multi-site login bar" or describe what it would look like. –  Kent Pawar Dec 10 '12 at 15:50
Are you planning to build your own custom SSO implementation or would you be using a 3rd provider such as Facebook, Google...? –  Kent Pawar Dec 10 '12 at 15:52

1 Answer 1

You would need to add along with a username and password fields, a site field, probably a select input element.

Before you process the login credentials you would see what site the user has selected and take it from there.

I'm assuming you are coding this yourself for a custom project.

If you know sql and basic php sessions or cookies then this shouldn't be too difficult.

share|improve this answer

Your Answer


