in php
You can stick that php above any html file, substitute the right username and password for the placeholders I used of the wanted username and the wanted password and it will work across all the pages you want protected, and will only ask for the username and password again if the client closes the browser.
Its a little sloppy with the gate logic cause I yanked it out of another file that required the wonky strange gates and odd nots and stuff to go in the than side of the if than else.
<? session_start(); if ((!$_POST[username]) || (!$_POST[password])) { } else { if ($_POST[username] == " the wanted username ") { if ($_POST[password] == " the wanted password ") { $_SESSION[logged] = "yes"; } } } if (!($_SESSION[logged] == "yes")) { echo " --- HTML form with 2 text boxes to accept user info in POST form that links to this very file---"; die(); } ?> HTML you want protected
You can stick that php above any html file, substitute the right username and password for the placeholders I used of the wanted username and the wanted password and it will work across all the pages you want protected, and will only ask for the username and password again if the client closes the browser.
Its a little sloppy with the gate logic cause I yanked it out of another file that required the wonky strange gates and odd nots and stuff to go in the than side of the if than else.