PHP Not parsing Variables?
<p>i am creating a tournament sign up, it currently has 2 pages. 1st will take basic detail and ask how many competitors are to be registered, and then create a table for that amount. 
 can be seen here. </p>

<p><a href="http://fsma.co.uk/fsma/revolution/instructor.php" rel="nofollow">http://fsma.co.uk/fsma/revolution/instructor.php</a></p>

<p>once the competitor info is input on the next page the script should determine the category no's from the info in the script. 
but for some reason its not assigning the variables, i have a feeling its something to do with the arrays</p>

<pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;
    &lt;?php 
session_start();
ini_set('display_errors',1); 
 error_reporting(E_ALL);
 //get information for competitors. and dispaly here. 
             //set variables. 
          $competitor_name = $_POST['competitor_name'];
            $dob = $_POST['dob'];
            $weight = $_POST['weight'];
            $points = $_POST['points'];
            $veterans = $_POST['veterans'];
            $continuous = $_POST['continuous'];
            $sports_sword = $_POST['sword'];
            $patterns = $_POST['patterns'];
            $musical = $_POST['musical'];
            $weapons = $_POST['weapons'];
            $team = $_POST['team_forms'];
            $team_mates = $_POST['team_mates'];
            $team_size = $_POST['team_size'];
            $team_type = $_POST['team_type'];
            $kids_spec = $_POST['kids_spec'];
            $adults_spec = $_POST['adults_spec'];
            $time_training = $_POST['time_training'];
            $grade = $_POST['grade'];
                $gender = $_POST['gender'];
            $count = 1;
            $no_of_competitors = sizeof($competitor_name);
                 // $i = 0;
            for($i=0; $i&lt;$no_of_competitors; $i++){ //( $competitor_name as $i =&gt; $name ) {

                //determine age 

$competition_date = "2013-05-19";

$diff = abs(strtotime($dob[$i]) - strtotime($competition_date));

$years = floor($diff / (365*60*60*24));

$months = floor(($diff - $years * 365*60*60*24) / (30*60*60*24));

$days = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24));

//printf("%d years \n", $years, $months, $days);

$age = $years;



//find musical forms category

if($musical[$i] == 'Musical'){

if($age &lt;=11 &amp;&amp; $age &gt;=7){$musical_division = 11;}

if($age &lt;=15 &amp;&amp; $age &gt;=12){$musical_division = 12;}

if($age &gt;=16){$musical_division = 13;}

$total_categories++;

}//end musical



//find weapons forms category

if($weapons[$i] == 'Weapons'){

if($grade[$i] != 'Black Belt' &amp;&amp; $age &lt; 16){ $weapons_division =14;}

if($grade[$i] == 'Black Belt' &amp;&amp; $age &lt; 16){ $weapons_division =15;}

if($grade[$i] != 'Black Belt' &amp;&amp; $age &gt; 15){ $weapons_division =16;}

if($grade[$i] == 'Black Belt' &amp;&amp; $age &gt; 15){ $weapons_division =17;}

$total_categories++;}//end weapons.


if($continuous[$i] === 'Continuous'){
//peewee
if($age  &lt;16){
if($weight[$i] &lt;25){$continuous_division = 42;}
if($weight[$i] &gt;24 &amp;&amp; $weight[$i] &lt; 30){$continuous_division = 43;}
if($weight[$i] &gt;35){$continuous_division = 44;}

//boys
if($gender[$i] =="male"){
if($weight[$i] &lt;45){$continuous_division=45;}
if($weight[$i] &gt;44 &amp;&amp; $weight[$i] &lt; 55){$continuous_division = 46;}
if($weight[$i] &gt; 55){$continuous_division = 47;}
if($age &gt;15 &amp;&amp; $age &lt;18){$continuous_division = 51;}//boys under18
}//end boys

//girls
if($gender[$i] =="female"){
if($weight[$i] &lt;45){$continuous_division=48;}
if($weight[$i] &gt;44 &amp;&amp; $weight[$i] &lt; 55){$continuous_division = 49;}
if($weight[$i] &gt; 54){$continuous_division = 50;}
if($age &gt;15 &amp;&amp; $age &lt;18){$continuous_division = 52;}//girls under18
}//end girls
}//end under16

if($age &gt;15){
if($gender[$i] == 'female' &amp;&amp; $weight[$i] &lt;65){$continuous_division=53;}
if($gender[$i] == 'female' &amp;&amp; $weight[$i] &gt;64){$continuous_division=54;}
if($gender[$i] == 'male' &amp;&amp; $weight[$i] &lt;75){$continuous_division=55;}
if($gender[$i] == 'male' &amp;&amp; $weight[$i] &gt;75 &amp;&amp; $weight[$i] &lt;85){$continuous_division=56;}
if($gender[$i] == 'male' &amp;&amp; $weight[$i] &gt;85){$continuous_division=57;}
}//end adults. 
}//end continuous



if($sports_sword[$i]== 'Sports Sword'){

if($age &lt;16){

if($weight[$i] &lt;25){ $sword_division = 58;}

if($weight[$i] &gt;24 &amp;&amp; $weight[$i] &lt;35){$sword_division = 59;}

if($weight[$i] &lt;45 &amp;&amp; $gender[$i] =='female'){ $sword_division = 60;}

if($weight[$i] &gt;44 &amp;&amp; $gender[$i] =='female'){ $sword_division = 61;}

if($weight[$i] &lt;45 &amp;&amp; $gender[$i] =='male'){ $sword_division = 62;}

if($weight[$i] &gt;44 &amp;&amp; $gender[$i] =='male'){ $sword_division = 63;}

}//end kids.



if($age &gt;15){

if($gender[$i] == 'female'){$sword_division = 64;}

if($weight[$i] &lt; 80 &amp;&amp; $gender[$i] =='male'){ $sword_division = 65;}

if($weight[$i] &gt; 79 &amp;&amp; $gender[$i] =='male'){ $sword_division = 66;}
if($veterans[$i] != "Veterans"){$veterans ="Regular";}


}//end adults 

}//end sword. 
//show information enter with categoy numbers... 
if($points[$i] == "") {$points_division="N/A";}elseif($veterans[$i] == "Veterans"){$points_division=41;}
if($continuous[$i] == "") {$continuous_division="N/A";}
if($patterns[$i] == ""){$pattern_division ="N/A";}
if($musical[$i] == ""){$musical_division = "N/A";}
if($weapons[$i] == ""){$weapons_division = "N/A";}
if($sports_sword[$i] == ""){$sword_division = "N/A";}
                ?&gt;
          &lt;center&gt;
           &lt;table border="1" border-color="000000" border-collapse="collapse"&gt; 
           &lt;tr&gt;
           &lt;td colspan="7"&gt;&lt;center&gt; &lt;h1&gt;&lt;?php echo $competitor_name[$i]; ?&gt;&lt;/h1&gt; &lt;/center&gt;&lt;/td&gt;
           &lt;/tr&gt;    
           &lt;tr&gt;
           &lt;td&gt;&lt;strong&gt;DOB:&lt;/strong&gt;&lt;?php echo $dob[$i]; ?&gt;&lt;/td&gt; &lt;td&gt;&lt;strong&gt;¦ Age&lt;/strong&gt;: &lt;?php echo $age; ?&gt;yrs&lt;/td&gt;
           &lt;td&gt;&lt;strong&gt;Weight:&lt;/strong&gt;&lt;?php echo $weight[$i]; ?&gt;KG's&lt;/td&gt;&lt;td&gt;&lt;strong&gt;Grade:&lt;/strong&gt;  &lt;?php echo $grade[$i]; ?&gt;&lt;/td&gt; 
           &lt;td&gt;&lt;strong&gt;Time Training:&lt;/strong&gt; &lt;?php echo $time_training[$i]; ?&gt;&lt;/td&gt; &lt;td&gt;&lt;strong&gt;Kids: &lt;/strong&gt;&lt;?php echo $kids_spec[$i]; ?&gt;&lt;/td&gt;
           &lt;td&gt;&lt;strong&gt;Adults: &lt;/strong&gt;&lt;?php echo $adults_spec[$i]; ?&gt;&lt;/td&gt;
           &lt;/tr&gt;
             &lt;tr&gt;
               &lt;td&gt;&lt;strong&gt;Points: &lt;/strong&gt;&lt;?php echo $points_division; ?&gt;&lt;/td&gt;
               &lt;td&gt;&lt;strong&gt;Veterans: &lt;/strong&gt;&lt;/td&gt;

               &lt;td&gt;&lt;strong&gt;Continuous: &lt;/strong&gt;&lt;?php echo $continuous_division; ?&gt;&lt;/td&gt;
               &lt;td&gt;&lt;strong&gt;Sport Sword: &lt;/strong&gt;&lt;?php echo $sword_division; ?&gt;&lt;/td&gt;
                &lt;td&gt;&lt;strong&gt;Patterns: &lt;/strong&gt;&lt;?php echo $pattern_division; ?&gt;&lt;/td&gt;
               &lt;td&gt;&lt;strong&gt;Musical Forms: &lt;/strong&gt;&lt;?php echo $musical_division; ?&gt;&lt;/td&gt;
               &lt;td&gt;&lt;strong&gt;Weapons Forms: &lt;/strong&gt;&lt;?php echo $weapons_division; ?&gt;&lt;/td&gt;
               &lt;td colspan="2"&gt;&lt;/td&gt;
               &lt;/tr&gt;
           &lt;/table&gt; &lt;/center&gt;   &lt;br /&gt;
           &lt;?php
           //insert into DB. 


         $count++;     } 
?&gt;
</code></pre>
