<?php
//Start the session variable.
session_start();
//Put that line at the very top of every file
//that you need to be logged in for, or
//uses session vars.
if (!$_POST['username_textbox_name_here'] || !$_POST['password_textbox_name_here'])
{
echo("ERROR > Please type a username and password");
exit;
}
/*
At this point, you want to verify the login information
against stored data. This could be hard-coded here if
you have 1 or 2 permanent users, or checked with a database.
If you need help there are examples around the Internet.
*/
//If the login is good, then set the session variable
$_SESSION['loginname'] = $uname;
//...or something to that extent.
//To check the login, make sure the session var is set
//to a good value.
?>