title: send a post to another page in php
body: <p>hi i cant send name to another page</p>
  
  <p>i want to make exam online script but when i want to get a name and send to another page i have this error </p>
  
  <pre><code>( ! ) Notice: Undefined index: name in C:\wamp\www\daneshtranse\exam\answer.php on line 2
  Call Stack
  #   Time    Memory  Function    Location
  1   0.0003  239520  {main}( )   ..\answer.php:0
  </code></pre>
  
  <p>//
      
  
  <pre><code>require_once '../database/connection.php';
  
  $FetchedEdit = SelectSolo('exam', 'ASC');
  ?&gt;
  &lt;form action="answer.php" method="post"&gt;
      &lt;div class="row"&gt;
          &lt;div class="container"&gt;
              &lt;div class="exam pull-left"&gt;
                  &lt;?php
                  //           &lt;?php
                  // input1, input2, input3, input4
                  while($queryFetched = $FetchedEdit-&gt;fetch_assoc()){?&gt;
                      &lt;h5&gt;&lt;?php echo $queryFetched['id'];?&gt; - &lt;?php echo $queryFetched['question'];?&gt;&lt;/h5&gt;
                      &lt;input type="radio" class="myRadio" name="&lt;?php echo $queryFetched['id'];?&gt;" value="&lt;?php echo $queryFetched['input1'];?&gt;"&gt;&lt;?php echo $queryFetched['input1'];?&gt;&lt;br&gt;
                      &lt;input type="radio" class="myRadio" name="&lt;?php echo $queryFetched['id'];?&gt;" value="&lt;?php echo $queryFetched['input2'];?&gt;"&gt;&lt;?php echo $queryFetched['input2'];?&gt;&lt;br&gt;
                      &lt;input type="radio" class="myRadio" name="&lt;?php echo $queryFetched['id'];?&gt;" value="&lt;?php echo $queryFetched['input3'];?&gt;"&gt;&lt;?php echo $queryFetched['input3'];?&gt;&lt;br&gt;
                      &lt;input type="radio" class="myRadio" name="&lt;?php echo $queryFetched['id'];?&gt;" value="&lt;?php echo $queryFetched['input4'];?&gt;"&gt;&lt;?php echo $queryFetched['input4'];?&gt;&lt;br&gt;
                      &lt;br&gt;&lt;hr&gt;
                      &lt;?php
                  }
                  ?&gt;
                  &lt;button type="button" id="submit" class="btn btn-sauces" value="ثبت" name="submit"&gt;ssss&lt;/button&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>this is answer page</p>
  
  <pre><code>&lt;?php
  echo $_POST["name"];
  </code></pre>
  
  <p>what should I do</p>