<?php
	session_start();
	include "../correlations/includes.php";
	
	$allfields = array(	"email", "productuse", "status", "students");
	$required  = array(	"email", "productuse", "status");
				  
	if (isset($_POST['Submit']))
	{
		//  capture the posted values in Session variables
		foreach($allfields as $field) {
			$_SESSION[$field] = $_POST[$field];
		}

		// check for required fields
		$_SESSION['errors'] = "";
		foreach($required as $field) {
			if (!$_POST[$field]) {
				$_SESSION['errors'] .= "	- $field is a required field <br>";
			}
		}

		// check for valid email
		if (!isValidEmail($_SESSION['email']))
			$_SESSION['errors'] .= "	- invalid email address <br>";
			
		// if all fields OK
		if ($_SESSION['errors'] == "")
		{
			// display success page
			header("Location: ../pianomethods/pmmatrix.htm");
			exit;
		}
	}
	else
	// first time through - Submit button not pressed
	{
		$_SESSION['errors'] = "";
	}
?>


<!DOCTYPE html>
<html>

<head>

<title>Correlation Identity Form</title>

<meta name="description" content="Harmonic Vision is the developer and publisher of the Music Ace series of music education software.">
<meta name="keywords" content="music education, piano lessons, music education software, music theory, learning music, music lessons, beginning music, music software, Music Ace, Music Doodle Pad, Music Ace 2, Music Ace Deluxe, Music Ace Maestro">

<link rel="stylesheet" href="../css/styles.css" type="text/css">

<style type="text/css">
.style2 {font-family: Arial, Helvetica, sans-serif}
.style27 {	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #000000;
}
.style29 {	font-family: Arial, Helvetica, sans-serif;
	font-size: 24px;
	font-weight: bold;
	color: #000000;
}
.style3 {	font-size: 11px;
	font-family: Arial, Helvetica, sans-serif;
}
.style31 {font-size: 12px; font-family: Arial, Helvetica, sans-serif; color: #FF0000; }
.style32 {color: #FF0000}
.style34 {font-size: 10px}
.style4 {font-family: Arial, Helvetica, sans-serif; font-size: 14px; }
.style35 {font-size: 18px}
.styleRED {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #FF0000;
	background-color: #dddddd;
}
</style>
</head>

<body OnLoad="document.F1.email.focus();">
<br>  <!--  <br> to push the whole page down 1 line from the browser top  -->

<!-- ===============================  start page container table (entire page is enclosed by this table) ===== -->
<table border="1" cellpadding="0" cellspacing="0" width="800" align="center" bgcolor="#fffffe"><tr><td valign="top">

<!-- =================================== start Logo Header ======================================= --><!-- #BeginLibraryItem "/Library/header.lbi" -->
<table width="788" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF">
  <tr><td><img src="../images/spacer.gif" alt="" width="784"  height="5"></td></tr>
  <tr><td><img src="../images/insidetop.gif" alt="" width="784"  height="57"></td></tr>
</table>
<!-- #EndLibraryItem --><!-- =================================== end Logo Header ======================================= -->

<!-- =================================== start Navigation Buttons ======================================= --><!-- #BeginLibraryItem "/Library/navbuttons.lbi" --><table width="771" border="0" cellspacing="0" cellpadding="0" align="center"><tr><td>
  <div class="navBar"" align="left">
    <ul id="nav">
	<li><a href="#">Products</a>
		<ul>
			<li><a href="../madfact.htm">Music Ace Deluxe</a></li>
			<li><a href="../mamfact.htm">Music Ace Maestro</a></li>
			<li><a href="../mafact.htm">Music Ace</a></li>
			<li><a href="../ma2fact.htm">Music Ace 2</a></li>
			<li><a href="../pafact.htm">Piano Ace</a></li>
			<li><a href="../mampupg.htm">Product Upgrades</a></li>
		</ul>
	</li>
	
	<li><a href="#">At Home</a>
		<ul>
			<li><a href="../hs/index.htm">Homeschool</a></li>
			<li><a href="../products_home.htm">Individual or family</a></li>
			<li><a href="../pianostudent/index.htm">Piano Student</a></li>
		</ul>
	</li>
    	
	<li><a href="#">School</a>
		<ul>
			<li><a href="../products_edu.htm">Products</a></li>
			<li><a href="../educatorresources.htm">Resources</a></li>
		</ul>
	</li>	
	
	<li><a href="#">Studio</a>
       <ul>
            <li><a href="../pianoteacher/index.htm">Studio Teachers</a></li>
			<li><a href="../educatorresources.htm">Resources</a></li>
       </ul>
	</li>
			
	<li><a href="../mampupg.htm">Upgrades</a></li>	
    
	<li><a href="#">Support</a>
      <ul>
            <li><a href="../techsupport/index.htm">Technical Support</a></li>
            <li><a href="../dealer.htm">Dealer support</a></li>
            <li><a href="../news.htm">Press/media</a></li>
            <li><a href="../contactus.html">Contact Us</a></li>
       </ul>
    </li>	
    
	<!-- <li><a href="demoform.php">Free Demo</a></li> -->
  </ul>
  </div>
</td></tr></table>
<!-- #EndLibraryItem --><!-- =================================== end Navigation Buttons ======================================= -->

<!-- ========================== start Breadcrumb - update this for each page  ============ -->
<table width="771" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td>
<div id="breadcrumb"><a href="../index.htm">Home</a>&gt; <a href="../pianoteacher/index.htm">Studio</a>&gt; Piano Method Correlations</div>
    </td>
  </tr>
</table>
<!-- ================================= end Breadcrumb ==================================== -->

<!-- ================================= Start Content container table ================================== -->
  <div><table border="0" cellpadding="0" cellspacing="0" width="784" bgcolor="#FFFFFF" align="center"><tr><td>
	 
<!-- ============================== START CONTENT - put page content here =============================== -->	 
		 
<table width="584" border="0" align="center" cellpadding="10" cellspacing="0" style="border-collapse: collapse" >
  <tr>
    <td width="643" valign="top"><p align="center" class="style29 style35">Download Piano Method Correlations </p>
        <p align="left" class="verdana-11-spaced">To download a free pdf version of the  Piano Method Correlations, please 
          complete the form below and then click the &quot;<strong>Submit</strong>&quot; button. </p>
      <p align="left" class="style2">
        
        </p>
      <table width="66%" border="1" align="center" cellpadding="0" cellspacing="0" bgcolor="#dddddd">
          <tr>
            <td><form name="F1" action="correlationform.php" method="POST" class="style4">
                <div align="right"><span class="style31 style34">* Required field&nbsp;&nbsp;</span></div>
                <?php
// if missing fields were detected, display a table with all the missing fields
if (isset($_SESSION['errors']) && $_SESSION['errors'] <> "") {
    echo '<table width="513" border="0">
	        <tr>
            <td  align="center" width="500"><span class="styleRED">Required fields are missing or invalid - please correct the fields and Submit again <br>' . 
                $_SESSION['errors'] . '</span></td></tr>
           </table>';
}
?>

<table width="319" border="0" cellspacing="2" cellpadding="5" align="center">
                  <tr>
                    <td width="532" align="left" class="verdana-11">E-mail Address<span class="style32"> *</span><br>
                            <input name="email" type="text" size="50" value="<?php echo $_SESSION['email'];?>" class="verdana-11" >
                    </td>
                  </tr>
                  <tr>
                    <td height="38" class="verdana-11"><label>Music Ace Product Used <span class="style32">*</span><br>
                          <select name="productuse" class="verdana-11">
                            <option>Music Ace Maestro</option>
                            <option>Music Ace</option>
                            <option>Music Ace 2</option>
                            <option>Music Ace Deluxe</option>
                            <option>None</option>
                          </select>
                    </label></td>
                  </tr>
                  <tr>
                    <td height="35" valign="top" class="verdana-11"><label>I am a<span class="style32"> *</span><br>
                            <select name="status" class="verdana-11">
                              <option>Parent</option>
                              <option>Student</option>
                              <option selected>Piano Teacher</option>
                              <option>Other Music Teacher</option>
                              <option>Other</option>
                            </select>
                    </label></td>
                  </tr>
                  <tr>
                    <td height="29" class="verdana-11"><label>If piano teacher, number of students you teach<br>
                          <input type="text"  name="students" size="4" value= "<?php echo $_SESSION['students'] ?>" class="verdana-11">
                    </label></td>
                  </tr>
                  <tr>
                    <td><div align="center" class="verdana-11">
                        <input name="Submit" type="submit" id="Submit" value="Submit" class="verdana-11">
                    </div></td>
                  </tr>
                </table>
            </form></td>
          </tr>
      </table></td>
  </tr>
</table>
	
<!-- ==============================   END CONTENT ====================================================== -->

<!-- ================================= End Content container table ================================== -->
  </td></tr></table></div>
  
<!-- ================================= start Footer ============================================ --><!-- #BeginLibraryItem "/Library/footer.lbi" --><table width="771" border="0" cellspacing="0" cellpadding="0" align="center" class="footer">
  <tr>
    <td>
       <div id="footernav">
          <a href="../index.htm" target="_parent">Home</a>
          <a href="../privacy.htm" target="_parent">Privacy Policy</a>
          <a href="../contactus.html" target="_parent">Contact Us</a></div>
       <div align="center">Copyright &copy; 2013 Harmonic Vision Inc.<br><br></div>
	</td>
  </tr>
</table>
<!-- #EndLibraryItem --><!-- ===============================  end Footer =============================================== -->

<br>

<!-- ==============================  close container table ======================== -->
</tr></td></table>

</body>
</html>
