Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,782 members, 7,820,739 topics. Date: Tuesday, 07 May 2024 at 08:31 PM

PHP: How Do I Create A Login Page That Directs Users To Respective Accounts? - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / PHP: How Do I Create A Login Page That Directs Users To Respective Accounts? (1184 Views)

Php Login Page Error / In Need Of Script To Help Me Add Facebook Users To A Group / How Can I Create A Good Software Company That Will Flourish In Nigeria? (2) (3) (4)

(1) (Reply) (Go Down)

PHP: How Do I Create A Login Page That Directs Users To Respective Accounts? by 2cute(m): 10:13pm On Sep 23, 2016
Beloved programming pros, please help enlighten me on how to create a login page in PHP, which sends each user to their respective accounts?
Thanks a lot in advance.
Re: PHP: How Do I Create A Login Page That Directs Users To Respective Accounts? by noordean(m): 12:12am On Sep 24, 2016
2cute:
Beloved programming pros, please help enlighten me on how to create a login page in PHP, which sends each user to their respective accounts?
Thanks a lot in advance.
From my own little knowledge. I think you can save a user's username in session at the point of login, which can then be used to track him down through the protected pages.
Re: PHP: How Do I Create A Login Page That Directs Users To Respective Accounts? by DonSegmond(m): 6:29am On Sep 24, 2016
You are trying to conflate two different ideas.

First there is authentication. This is the login.
Then there is authorization. This is a matter of if they have permission to see something.

Authentication - make em login, track em.
Authorization - for anyone that access a resource, have them provide their identify and see if they have access.

This is very basic. The fact that you are asking this is telling, you should not try to solve this yourself. I suggest you learn a framework that has already solved all this, and just use it. I recommend laravel. It has a simple learning curve.
Re: PHP: How Do I Create A Login Page That Directs Users To Respective Accounts? by Dangujba1111: 12:57pm On Sep 24, 2016
Create function with this
function islogin(){
if($_SESSION[user]){
return true;
}
else {
return false;
}

In your login page session the Username and use header to sent the user to the account, after then Fetch the user information
Re: PHP: How Do I Create A Login Page That Directs Users To Respective Accounts? by greatgbolla(m): 3:08pm On Sep 24, 2016
Simply create a user_type field in your dB table, which you use to determine authorization for the user. (once authentication is successful)
Re: PHP: How Do I Create A Login Page That Directs Users To Respective Accounts? by 2cute(m): 8:55pm On Sep 24, 2016
noordean, DonSegmond, Dangujba1111, greatgbolla, thanks a lot for your responses. I had a really busy day and that's why I wasn't here earlier. I will look at the solutions mentioned and revert if I need more help.Blessings!

(1) (Reply)

What Is Operators In Visual Basic? Introduction Programming - Tutoria 4 / An Overview Of Web App Versus Mobile App / ASP.NET MVC With Angularjs Developer Needed 000000000000000000!

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 9
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.