"; if (isset($_POST[SignIn])) { // capture the posted values in Session variables $_SESSION[errors] = ""; foreach($required as $field) { $_SESSION[$field] = $_POST[$field]; if (!$_POST[$field]) { $_SESSION[errors] .= " $field is required
"; } } //=============== look up UserID and Password here if ($_SESSION[errors] == "") { // connect to MySQL $_SESSION[dbConnect] = connectToDB($DB); if (!$_SESSION[dbConnect]) { // send email notification if connection fails sendEmail($DEFAULTEMAILTO, $DEFAULTEMAILFROM, "MySQL - connectToDB failed in " . $ME, ""); $_SESSION[errors] .= $DBERROR; } else { $sql="SELECT * FROM " . $TABLE . " WHERE UserID=" . "'" . $_SESSION[UserID] . "'"; $res=mysql_query($sql,$_SESSION[dbConnect]); if (!$res) { // send email notification of DB failure sendEmail ($DEFAULTEMAILTO, $DEFAULTEMAILFROM, "MySQL - failure" , $sql); $_SESSION[errors] = $DBerror; } else { // see if entry found for UserID if (mysql_num_rows($res) == 0) { $_SESSION[errors] = " User ID not registered
"; } else { // check if password matches if (mysql_result($res, 0, 1) != $_SESSION[Password]) { $_SESSION[errors] = " Incorrect Password
"; } else { // check if UserID authenticated if (mysql_result($res, 0, 3) == 0) { $_SESSION[errors] = $authError; } else { // successful login // update the dateLastLogin and loginCount fields $sql="UPDATE " . $TABLE . " SET dateLastLogin = '" . date('Y-m-d') . "', loginCount = loginCount + 1 WHERE UserID=" . "'" . $_SESSION[UserID] . "'"; if (!mysql_query($sql, $_SESSION[dbConnect])) { // send email notification of DB failure sendEmail ($DEFAULTEMAILTO, $DEFAULTEMAILFROM, "MySQL - failure" , $sql); $_SESSION[errors] = $DBerror; } else { // load the main correlation page $_SESSION[loggedIn] = TRUE; header("Location: main.php"); exit; } } } } } // close database mysql_close($_SESSION[dbConnect]); } } } else { // first time through - SignIn button not pressed $_SESSION[loggedIn] = FALSE; $_SESSION[Country] = "United States"; $_SESSION[errors] = ""; } ?> Correlations - Login Page

Piano Method Search Tool Sign-in

The Piano Method Search Tool makes it easy to use the Music Ace lessons in conjunction with popular piano method books. It allows piano teachers and students to easily locate Music Ace lessons that correlate to specific piano method books by method, book and page. It also allows Music Ace lessons to be located by topic, such as "half notes" or "rests".
     
Please Sign In

'; echo $_SESSION[errors]; echo '
'; if ($_SESSION[errors] == $authError) { echo '
click here to retry authentication

'; } echo ''; } ?>
User ID  
I forgot my User ID
   
Password
I forgot my Password
 
 
 

Not a member yet?
Register here