title: PHP pass variable through URL
body: <p>I understand how a PHP URL works - I think ... but I'm having problems getting the <em>actual</em> value of the variable to be passed in the example below.</p>
  
  <h3> Example </h3>
  
  <p>Note: I am adding the below form into a data cell (as part of a table being read via PHP).</p>
  
  <pre><code>$currentrowid = 1;
  
  echo '&lt;td&gt;
    &lt;div class="editdelete"&gt;
      &lt;form action="phpindex.php?page=edit&amp;thisrow=&lt;?php echo $currentrowid;?&gt;" method="post"&gt;
        &lt;input type="submit" value="Edit" &gt;
      &lt;/form&gt;
    &lt;/div&gt;
  &lt;/td&gt;';
  </code></pre>
  
  <p>... Some other section of code to read the URL output by the form above:</p>
  
  <pre><code>$val = $_POST['thisrow']; 
  echo "the value is: " .$val; //Outputs "$currentrowid"
  </code></pre>
  
  <p>So, as you can see the code returns the actual <strong>name</strong> of the variable being passed, NOT the value of the variable being passed.</p>
  
  <p>Any ideas here?</p>