title: Redirect after submit to next page
body: <p>I'm trying to link two php pages having questions. Once a form is submitted it checks on database to store the value and then it must redirect to next page.
  But I'm stuck here at header() function. It's not redirecting to next page. Where am I doing it wrong?</p>
  
  <pre><code>    $q1= "SELECT * FROM user_lang WHERE lang='$lang' AND q_id='1'";
  $r1=mysqli_query($connection, $q1) or die(mysqli_error($connection));
  $row1=mysqli_fetch_assoc($r1);
  
  $q2="SELECT * FROM user_test WHERE mid='$username'";
  $r2=mysqli_query($connection, $q2) or die(mysqli_error($connection));
  $row2=mysqli_fetch_row($r2);
  echo '&lt;div class="wrapper" style="padding-top:5%;"&gt;';
  echo '&lt;div class="login-page"&gt;
  &lt;h2 align="center"&gt;'.$lang.' Module 1&lt;/h2&gt;';
  if(isset($_POST['answer']))
  {
      $answer=$_POST['answer'];
      if(mysqli_num_rows($r2)&gt;0)
      {
  $loadquery2="UPDATE user_test SET q1='$answer' WHERE mid='$username'";
  $loadres2=mysqli_query($connection,$loadquery2) or die(mysqli_error($connection));
          header('Location: "/vtest/q2.php"');
      }
      else
      {
          $loadquery2="INSERT INTO user_test(mid,q1) VALUES ('$username','$answer')";
          $loadres2=mysqli_query($connection,$loadquery2) or die(mysqli_error($connection));
          header('Location: "/vtest/q2.php"');
      }
  }
  else
  {
  echo "&lt;form method='POST'&gt;";
  echo $row1['quest'];
  echo '&lt;br&gt;&lt;input type="radio" name="answer" value="a" checked&gt;'.$row1['o1'].'&lt;br&gt;';
  echo '&lt;input type="radio" name="answer" value="b" &gt;'.$row1['o2'].'&lt;br&gt;';
  echo '&lt;input type="radio" name="answer" value="c" &gt;'.$row1['o3'].'&lt;br&gt;';
  echo '&lt;input type="submit" value="Submit"&gt;';
  echo"&lt;/form&gt;";
  }
  echo '&lt;/div&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;';
  ?&gt;
  </code></pre>
  
  <p>BTW this file is named q1.php &amp; when I submit the form the url doesn't change. I think it means its not a fault on page q2.php but on q1.php itself.</p>