<?php
$query = "add query statment here"; 
$result = mysql_query($query) or die("Query failed, you are not logged in.");
$isAuth = false; //set to false originally
while ($row = mysql_fetch_array($result))
{
if(($row['userName'] == $userName) && ($row['passWord'] == $passWord))
//above row checks to see if username/password combination exists, set the $isAuth to true
//{ 
$isAuth = true; // $isAuth is now set to true
//session_start();
//session_register("");
//$_SESSION["latte"];
//}
} 
if($isAuth) // if this is true then do the operation stated underneath or do the else condition
{
// header( "Location: simple_page.php" ); // redirect
// header( "Location: add_entries.php" ); // redirect 
// header( "Location: admin.php" ); // redirect
// exit();
print "$userName - $passWord"; // print the variables passed from the form
}else{
// if login/pass does not exist
print "Wrong username or password

"; // print statement print "$userName - $passWord"; // print the variables passed from the form print "<p><A href='index.html'>Please Try Again"; // link to return to the input form } ?>