title: Sending a variable from MYSQL to another PHP page
body: <p>I am attempting to make a survey using PHP and MYSQL and cannot figure out how to send the value from the MYSQL value to another PHP page. </p>
  
  <p>I am using radio buttons populated with data from the corresponding MYSQL database and when the user presses the submit button I would like to send the answer to be sent to another page so I can compare it with other answers. I have used radio buttons that I have populated myself and sent them on to another page but a just can seem to get my head around this.</p>
  
  <p>So my main question would be how would you you do it? I have attempted using the <code>isset</code> function and Query Strings but once again I can do this with php variables but not with variables populated using mysql data.   </p>
  
  <p>The code below is what I have used to show users the question:   </p>
  
  <pre><code> &lt;?php
   require_once ('mysqli_connect.php');
  
  $q = "SELECT question_id, question, option_1, option_2, option_3, option_4 FROM survey_db LIMIT         1";     
   $result = @mysqli_query ($dbcon, $q); // Run the query
  if ($result) { // If it ran OK, display the records
  // Table header
   echo '&lt;table&gt;
  &lt;tr&gt;
  &lt;td&gt;&lt;b&gt; Please Answer All Questions In The Survey &lt;/b&gt; &lt;/td&gt;
  &lt;br&gt;
  &lt;/tr&gt;';
  // Fetch and print all the records
  while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
  echo '&lt;form action="answersurvey.php" method="GET"&gt;';
  echo '&lt;tr&gt;
  &lt;tr&gt;
  &lt;td&gt;
  &lt;br&gt;
  &lt;br&gt;
  
  &lt;ol&gt;&lt;li&gt; '.$row['question'].'&lt;/li&gt;&lt;/ol&gt;
  
  &lt;input type="radio"   name = "'.$row['question_id'].'" value= "1" /&gt;'.$row['option_1'].' 
  &lt;br&gt;
  &lt;input type="radio"   name = "'.$row['question_id'].'" value= "2" /&gt;'.$row['option_2'].' 
  &lt;br&gt;
  &lt;input type="radio"   name = "'.$row['question_id'].'" value= "3" /&gt;'.$row['option_3'].' 
  &lt;br&gt;
  &lt;input type="radio"   name = "'.$row['question_id'].'" value= "4" /&gt;'.$row['option_4'].' 
  &lt;br&gt;
  
  &lt;/td&gt;
  &lt;/tr&gt;';
  }
  echo '&lt;/table&gt;
  
  &lt;input type ="submit" value="submit"&gt;
  
  &lt;/form&gt;'; // Close the table
  
  ?&gt;
  </code></pre>