form posting other page getting error with php :  problem with form posting to other page (redirection)and db storage and getting results i am beginner in php

   **here is the code**

      include 'include/header.php';
    include 'include/connect.php';
    if(isset($_SESSION['id']) && $_SESSION['id']!='')

     $reslt = mysqli_query($connection,"SELECT * FROM `queries` WHERE   id='".$_SESSION['id']."'");
    $row1= mysqli_fetch_array($reslt);


    if(isset($_POST['submitquary'])){
    $title= $_POST['title'];
    $contact = $_POST['queries'];

    header("Location:pnf.php");
     }
      else
     {
       $msg='<span style="color:red;text-align:center;font-size:15px">Sorry you miss some</span>';   
      }
  **html**

       <form method="post" class="postquations">
         	    <label><b><class="p">Set your quaition title</b></label>
         	    <br>

         	<input type="text" placeholder="Title"id="title" name="title"  minlength="25" required=""autocomplete="off"  oninvalid="true"><br>
         	         	    <label><b>ask your quation</b></label>
         	         	    <br>

        <textarea class="textinput" rows="10" minlength="100" id="queries"name="queries" style="overflow:hidden" placeholder="Comment Here.." required></textarea>
        <input type="submit"id="submit" class="butn"value="POST" name="submitquary">
            </form>


  pnf.php


       <div class="title" > <?php echo $row['title'];?></div>
         <div class="quation"> <?php echo $row['queries'];?></div>

  please help me and explain why we are not getting results Thanks in advance