OK so whoever helps me is gonna have to break it down to me. I'm completely new at this....
I have an web form that is gonna need a series of data validation. Example. Make sure required fields have been entered. Number fields are in fact numbers. The email address is valid. Date is in YYYY-MM-DD...etc. I want to keep the validation data on the same page as the web form. (unless it is easier to do otherwise) If the data is valid it passed to insert2.php to be given to the database.

Here is the form I have:
Code:
<body>
<?php
$data = array();
$error = array();

if (!empty($_POST))
{
	foreach ($_POST as $k => $v)
	{
		$data[$k] = trim($v);
	}

	if(strlen($data['FirstName']) < 1)
	{
		$error['FirstName'] = 'Please fill in your first name';
	}

	if(strlen($data['LastName']) < 1)
	{
		$error['LastName'] = 'Please fill in your last name';
	}

	if(strlen($data['Email']) < 1)
	{
		$error['Email'] = 'Please fill in your email address';
	}

	if(strlen($data['Class']) < 1)
	{
		$error['Class'] = 'Please fill in your class';
	}

	if(strlen($data['Residence']) < 1)
	{
		$error['Residence'] = 'Please fill in your residence';
	}

	if(strlen($data['HighSchool']) < 1)
	{
		$error['HighSchool'] = 'Please fill in your high school';
	}

	if(strlen($data['Hobbies']) < 1)
	{
		$error['Hobbies'] = 'Please fill in your hobbies';
	}

	if(strlen($data['Legacy']) < 1)
	{
		$error['Legacy'] = 'Please fill in your legacy';
	}

	if(strlen($data['ShirtSize']) < 1)
	{
		$error['ShirtSize'] = 'Please fill in your shirt size';
	}

	if($data['Legacy'] == 'Yes' && strlen($data['Sorority']) < 1)
	{
		$error['Sorority'] = 'You\'re a Legacy!  Which Sorority?';
	}

	if(!is_numeric($data['Age']))
	{
		$error['Age'] = 'Please enter a valid age (numbers only)';
	}

	if(!is_numeric($data['ULVID']))
	{
		$error['ULVID'] = 'Please enter a valid ID (numbers only)';
	}

	if(
		strpos($data['Email'], '@') === false ||
		strpos($data['Email'], '.') === false ||
		strpos($data['Email'], ' ') != false ||
		strpos($data['Email'], '@') > strpos($data['Email'], '.')
	)
	{
		$error['Email'] = 'Please enter a valid email address';
	}


	if(!is_numeric($data['PhoneNumber']))
	{
		$error['PhoneNumber'] = 'Please enter a phone number (numbers only)';
	}

	$answer1 = nl2br(strip_tags(stripslashes($data['Answer1'])));
	$answer2 = nl2br(strip_tags(stripslashes($data['Answer2'])));

	if(empty($error))
	{
		// No errors, send on over to the other script
	}

	// Otherwise, continue processing and display the errors after each field.
}
?>

<form  method="POST" action="insert2.php">
  <table width="99%" border="20" cellpadding="20" cellspacing="10" bordercolor="#006633" bgcolor="#FFFFFF">
    <tr>
      <td width="31%"><label for="FirstName">First Name</label>
      <input type="text" name="FirstName" id="FirstName" /></td>
      <td width="40%"><label for="LastName">Last Name</label>
      <input type="text" name="LastName" id="LastName" /></td>
      <td width="29%" colspan="2" rowspan="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      </td>
    </tr>
    <tr>
      <td><label for="Age">Age</label>
        <input type="text" name="Age" id="Age" /></td>
      <td><label for="Email">Email</label>
        <input type="text" name="Email" id="Email" /></td>
    </tr>
    <tr>
      <td><label for="PhoneNumber">Phone</label>
        (###-###-####)
          <input type="text" name="PhoneNumber" id="PhoneNumber" /></td>
      <td><label for="CumGpa">Cumulative GPA (high school or college):</label>
        <input type="text" name="CumGpa" id="CumGpa" /></td>
      <td width="29%" colspan="2"><label>Shirt Size
          <input type="text" name="ShirtSize" id="ShirtSize" />
      </label></td>
    </tr>
  </table>
  <table width="99%" border="20" cellpadding="20" cellspacing="10" bordercolor="#006633">
    <tr>
      <td width="28%">
        <label for="Class">Class
        <input type="text" name="Class" id="Class" />
        <br />
      (Freshman, Sophmore, Junior, Senior)</label></td>
      <td width="72%" rowspan="2"><label for="ULVGpa">ULV Spring Semester GPA (if applicable):</label>
      <input type="text" name="ULVGpa" id="ULVGpa" />
      <label></label></td>
    </tr>
    <tr>
      <td>
        <label>Residence
        <input type="text" name="Residence" id="Residence" />
        </label>
        <label for="Residence"><br />
        (On Campus, Off Campus)</label></td>
    </tr>
    <tr>
      <td rowspan="2">
        <label>Legacy
        <input type="text" name="Legacy" id="Legacy" />
        </label>
        <label for="Legacy"><br />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Yes, No)</label></td>
      <td>(Legacy means that you have immediate family members who are part of a Greek-letter organization.) </td>
    </tr>
    <tr>
      <td><label>If so, Which ones?
          <input type="text" name="Sorority" id="Sorority" />
      </label>        <label for="Sorority"><br />
      (Alpha Omicron Pi, Phi Sigma Sigma, Sigma Kappa, Iota Delta)</label></td>
    </tr>
  </table>   
  <table width="99%" border="20" cellpadding="20" cellspacing="10" bordercolor="#006633">
    
    <tr>
      <td colspan="5"><label for="HighSchool">Previous High School (s) Attended:</label>
      <textarea name="HighSchool" cols="100" rows="0" id="HighSchool"></textarea></td>
    </tr>
    <tr>
      <td colspan="5"><label for="College">Other College (s) Attended (if applicable):</label>
      <textarea name="College" cols="95" id="College"></textarea></td>
    </tr>
    <tr>
      <td height="106" colspan="5"><label for="Hobbies">Hobbies/Interests:</label>
      <textarea name="Hobbies" cols="115" id="Hobbies"></textarea></td>
    </tr>
    
    <tr>
     
    </tr>
    <tr>
      <td colspan="5"><h3>What qualities, abilities or traits can you offer a sorority if selected as member?
        <textarea name="Answer1" cols="120" rows="4" id="Answer1"></textarea>
      </h3></td>
    </tr>
    <tr>
      <td height="63" colspan="5"><h3>What do you hope a sorority can give to you in return?
        <textarea name="Answer2" cols="120" rows="4" id="Answer2"></textarea>
        </h3>
      <label for="Answer1"></label></td>
    </tr>
    <tr>
      <td height="63" colspan="5"><h3>Permission Statement: By submitting my ID number, I grant permission for the ULV Greek Advisor to verify my </h3>
        <h3>eligibility for Greek membership at the University of La Verne.  I understand that my information will be used only</h3>
        <h3> to verify my eligibility. </h3>
      <p>
            <label for="ULVID">ULV ID #: </label>
            <input type="text" name="ULVID" id="ULVID" />
            <label for="Submit"> </label>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <label for="Submit"></label>
        <input type="submit" name="Submit" id="Submit" value="Submit" />
      </p></td>
    </tr>
  </table>
  <p>&nbsp;</p>
</form>

</body>
</html>
Here is my insert2.php
Code:
<?php

 $con = mysql_connect("localhost","user","password");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("CpaApp", $con);

$sql="INSERT INTO ApplicantInfo (ULVID, FirstName, LastName, Age, Email, PhoneNumber, Class,ShirtSize, Residence,CumGpa, ULVGpa,Legacy, Sorority,HighSchool, College, Hobbies, Answer1, Answer2)
VALUES ('$_POST[ULVID]', '$_POST[FirstName]','$_POST[LastName]','$_POST[Age];','$_POST[Email]',
'$_POST[PhoneNumber]','$_POST[Class]','$_POST[ShirtSize]','$_POST[Residence]','$_POST[CumGpa]','$_POST[ULVGpa]','$_POST[Legacy]','$_POST[Sorority]','$_POST[HighSchool]','$_POST[College]','$_POST[Hobbies]','$_POST[Answer1]','$_POST[Answer2]')";

if (!mysql_query($sql,$con))
  {
  echo"Error: Registration NOT Complete" ;
  }
   header("Location:regcomplete.php");

mysql_close($con)
	
?>
Without the validation code my form works properly. But I know that without it my database is at risk.

I'm not getting any errors. But the program isn't catching the errors when i'm testing it. Please HELP

Please Help! Thanks in Advance