title: PHP Update query no errors but not proceeding with the next page
body: <p>I need help with the query, no errors or such but it is not proceeding to the next page, see query below:</p>
  
  <pre><code>&lt;?php
  $connect=mysqli_connect('localhost','root','','lawadmission');
  
  session_start();
  
              $reference_number = $_SESSION['reference_number'];
              $citizenship = $_POST['citizenship'];
              $region = $_POST['region'];
              $spouse_name = $_POST['spouse_name'];
              $place_of_birth = $_POST['place_of_birth'];
              $civil_status = $_POST['civil_status'];
              $no_of_children = $_POST['no_of_children'];
              $weight = $_POST['weight'];
              $height = $_POST['height'];
              $degree = $_POST['degree'];
              $school = $_POST['school'];
              $yearGraduated = $_POST['yearGraduated'];
              $elementary = $_POST['elementary'];
              $elementaryDegreeObtained = $_POST['elementaryDegreeObtained'];
              $elementaryPeriodOfAttendance = $_POST['elementaryPeriodOfAttendance'];
              $highschool = $_POST['highschool'];
              $highschoolDegreeObtained = $_POST['highschoolDegreeObtained'];
              $highschoolPeriodOfAttendance = $_POST['highschoolPeriodOfAttendance'];
              $college = $_POST['college'];
              $collegeDegreeObtained = $_POST['collegeDegreeObtained'];
              $collegePeriodOfAttendance = $_POST['collegePeriodOfAttendance'];
              $postCollege = $_POST['postCollege'];
              $postcollegeDegreeObtained = $_POST['postcollegeDegreeObtained'];
              $postcollegePeriodOfAttendance = $_POST['postcollegePeriodOfAttendance'];
              $other = $_POST['other'];
              $otherDegreeObtained = $_POST['otherDegreeObtained'];
              $otherPeriodOfAttendance = $_POST['otherPeriodOfAttendance'];
  
              $query = "UPDATE applicants SET 
              citizenship = '$citizenship', 
              region = '$region',
              spouseName = '$spouse_name',
              placeOfBirth = '$place_of_birth',
              civilStatus = '$civil_status',
              childNo = '$no_of_children',
              weight = '$weight',
              height = '$height',
              degree = '$degree',
              school = '$school',
              yearGraduated = '$yearGraduated',
              elementary = '$elementary',
              elementaryDegreeObtained = '$elementaryDegreeObtained',
              elementaryPeriodOfAttendance = '$elementaryPeriodOfAttendance',
              highschool = '$highschool',
              highschoolDegreeObtained = '$highschoolDegreeObtained',
              highschoolPeriodOfAttendance = '$highschoolPeriodOfAttendance',
              college = '$college',
              collegeDegreeObtained = '$collegeDegreeObtained',
              collegePeriodOfAttendance = '$collegePeriodOfAttendance',
              postCollege = '$postCollege',
              postcollegeDegreeObtained = '$postcollegeDegreeObtained',
              postcollegePeriodOfAttendance = '$postcollegePeriodOfAttendance',
              other = '$other',
              otherDegreeObtained = '$otherDegreeObtained' and
              otherPeriodOfAttendance = '$otherPeriodOfAttendance' 
              WHERE referenceNo = '$reference_number'";
  
                  if(mysqli_query($connect, $query)){
                      header( "Location: registered.php" ); die;
                      echo "&lt;script&gt;window.open('registered.php','_self')&lt;/script&gt;";
                  }
                  if(mysqli_connect_errno($connect))
                  {
                      echo 'Failed to connect';
                  }
  
  
  ?&gt;
  </code></pre>