Good. What I'm wanting to do is to call it first time with the $GET['action'] (sorry for the typo). If $GET['action'] == "login" then I want to display the login (username/password) plus Forgot Password? Change Password links:
<?PHP
include "browser.inc";
if ($Browser == "ns") {
$size1 = "15";
$FieldsetO = "<table border='1'><tr><td align='center'>";
$FieldsetC = "</td></tr></table>";
$LegendMO = "<span class='txtMR16bL'>";
$LegendBO = "<span class='txtBL16bL'>";
$LegendC = "</span>";
} else {
$size1 = "20";
$FieldsetO = "<fieldset>";
$FieldsetC = "</fieldset>";
$LegendMO = "<legend class='txtMR16bL'>";
$LegendBO = "<legend class='txtBL16bL'>";
$LegendC = "</legend>";
}
echo "<!-- beginning of page content -->\n";
echo "<div align='center'>\n";
echo "<table border='0'><tr><td>\n";
echo "<form action='".$_SERVER[PHP_SELF]."' method='post'>\n";
echo $FieldsetO."\n";
echo $LegendBO."Sign In".$LegendC."\n";
echo " <table border='0' width='100%'>\n";
echo " <tr>\n";
echo " <td class='txtBL14bR'>Username: </td>\n";
echo " <td><input type='Text' name='user' size='".$size1."' /></td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td class='txtBL14bR'>Password: </td>\n";
echo " <td><input type='Password' name='pass' size='".$size1."' /></td>\n";
echo " </tr>\n";
echo " </table>\n";
echo $FieldsetC."\n";
echo "<br />\n";
echo "<div align='center'>\n";
echo " <input type='Reset'> \n";
echo " <input type='Submit' name='submit' value='Log In' />\n";
echo "</div>\n";
echo "</form>\n";
echo "<div align='center'>\n";
echo " <form action='password.php' method='post'>\n";
echo " <input type='submit' name='casePW' value='Reset Lost Password' />";
echo " ";
echo "<input type='submit' name='casePW' value='Change Password' /> \n";
echo " </form>\n";
echo "</div>\n";
echo "</td></tr></table>\n";
echo "</div>\n";
echo "<!-- end of page content -->\n";
?>
So, depending on what is set:
$GET['action'] == "Login"
$_POST['submit'] == "Log In"
$POST['casePW'] == "Reset Lot Password"
$_POST['casePW'] == "Change Password"
Then I want to set my case and take the proper action.
I'm having a bit of trouble getting this straight in my head. I've looked at a lot of User Authentication Tutorials and scripts, but none addresses my exact situation, which is that I don't have people "signing up". This area is limited only to teachers and other selected school staff. Each teacher/staff is only allowed to add/change/update things in their areas (their class assignments and/or any sports they coach, lunch menu, school news, specific pages. I set everyone password to the same thing (encrypted with crypt()) and the first time they log in, they are sent to the "Change Password" area to change their password. Once they enter their password, that information will be emailed to them at which time they will respond back to an activate script to have their password updated and activated. I also want to be able to allow them to change their password from time to time AND to reset it if they forget it. I'm also keeping track of last logged in time/date.
I feel like I'm being paranoid, but, being a parent of 2 teenagers, I never underestimate the ability of these kids to try to crack this and make a mess. So, I'm trying to make it as tough as I can.