How to prevent a user from directly accessing my php page by writing URL? | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
0

How to prevent a user from directly accessing my php page by writing URL?

If a person writes correct username and password, it redirects to home.php page. Now my problem is that if a person write the URL directly for home.php , he will be able to access it, without any login.

27th Apr 2019, 11:22 AM
Eyob
Eyob - avatar
1 Respuesta
+ 2
On that page you need to check if that user is allowed there. Like saving an access token in a coockie or local storage which needs to be send to your page to verify him.
27th Apr 2019, 11:24 AM
Dragonxiv
Dragonxiv - avatar