title: Variable not working inside If statement
body: <p>As I posted <a href="https://stackoverflow.com/questions/41454781/send-an-array-of-variable-instead-of-a-single-variable-over-html-button/41454903#41454903">here</a>, I managed to get 2 variable that I would like to use for further processing. Unfortunatly, I can't use is inside that if statement.</p>
  
  <pre><code>if (isset($_POST['modifybtn'])) { //Now we have our variables all set
      $SubmissionID = $_POST['modifybtn'];
      $CourseID = $_POST['courseid'];
      }
  //We do some irrelevant stuff here.... and then
  
  echo $CourseID; //Works
  if (isset($_POST['savebtn'])) {
          echo $CourseID; //Not Working
  
      saveData($AppID, $CourseID);
      header("Location: applicantCase.php");
  }
  if (isset($_POST['nextbtn'])) {
      saveData($AppID, $CourseID);
      header("Location: ApplicantApplyEducation.php");
  }
  </code></pre>
  
  <p>Why is that happening, one line before was working?</p>
  
  <p><a href="https://i.stack.imgur.com/Jtl3y.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Jtl3y.gif" alt="enter image description here"></a></p>