Hello,
I am coding a login authentication system.
All php pages in the website continually check that the user is logged in, using this algorithm:
Is user logged in?
true
{
do what supposed to do
}
false
{
load contents of invalidpassword.php
}
So if the user is not logged in, any webpage called must show a common page called invalidpassword.php. Since a login failure causes NOTHING to be output except for the invalidpassword.php page, I can either load this page up from within the current page and output the contents, or redirect the current page to it.
What is the best way of outputing invalidpassword.php from within another file? Bearing in mind, it only needs to contain html and no PHP instructions.
Thanks in advance,
James.