title: Pass cell value from html table to another page
body: <p>I have form1.php and preview.php files.In form1.php file,i have an html table which contains data from database.In every row,i have a column called "Preview" and there is an icon inside the cell.When the user clicks the icon,i want to redirect to preview.php and based on rowID,i will build a query and fill the form with extra data.Any ideas?</p>
  
  <p>In form1.php file:</p>
  
  <pre><code>&lt;script&gt;
  function GetValue()
  {
  
      var X = document.getElementById("myTable").rows[x.rowIndex].cells[5].innerHTML;
  
   }
  &lt;/script&gt;
  </code></pre>
  
  <p>With alert() function i test the above script and it's working( eg. X = 3 ).How can i pass this variable into preview.php and create an if statement based on this variable?I tried $_SESSION variables but i couldnt find a solution.Thanks in advance!</p>