I basically copied the PHP script below to protect a page from another post I found on this forum, and made a few changes. It works fine for the login but I have to reenter the credentials every time I go back to this protected page. It looks like the script is setting a cookie with no timeout to use on second visit etc… I would like the user to enter the credentials once and for revisits to the page use the setcookie to validate the user.
Any of you that know PHP script see what I am missing or in error in the script?
Or is there a better way to do this with Blocs 3?
php.txt.zip (1.5 KB)