Jump to content

[SOLVED] Quick question about log in form


hackerkts

Recommended Posts

I have written a login page, login.php, And I have a protected page(only logged in users are allow to view) which will require login.php on the very first line.

 

Which one of these methods is the best?

  • On the login.php put exit(), so if not authorized user access protected page it will only show the login form and cut of the rest of the page, it also cuts of body and html's tag.
  • Make use of if else statement on protected page

 

Anyone answer(s) is appreciated,

thanks!

Link to comment
https://forums.phpfreaks.com/topic/57284-solved-quick-question-about-log-in-form/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.