To gain access to this secure internet website a user has to supply a username and password in a form
this then results in a php block being executed when the script actions itself :
<?php
if(isset($_POST['submit']) ) { // true if form has been submitted
session_start();
include("inhouse_functions.inc");
connect_database("secure_online"); // obtain access to database
$SQL=" SELECT security_id FROM security
WHERE username='$username' AND password= '$password' ";
... rest of the form to collect username,password and submit button
<type="hidden" name="submit" value=1>
</form>
</html>
All other pages on this secure internet website then can check to see that authentication has
occured by checking if the primary key $sess_security_id has been registered to the session :
// the security_id key is registered with the session
// on authorisation
header("location: index.html "); // send to authentication page ..
}
?>
A nice feature here is that nothing sensitive is registered to the session and the value stored
has the potential of reconstructing any security information the subsequent scripts might demand such
as checking access level privileges (U,X or P) ....