title: send id through the link with php and MySQL
body: <p>I have table with items and for each item there is an option for user to delete and restore it. And there is special php file for it 'delete.php'.</p>
  
  <pre><code>print "&lt;td&gt;";
  if ($row['deleted'] == 'y') {
  print "&lt;a href='delete.php?id=2'&gt;Undeleted&lt;/a&gt; ";
                       }
  if ($row['deleted'] == 'n') {
  print "&lt;a href='delete.php?id=1'&gt;Deleted&lt;/a&gt; "; //'$_GET['id']'
  }
  print "&lt;/td&gt;"
  </code></pre>
  
  <p>My question is how can I get the id of item that user clicked and send it to 'delete.php'?
  So instead of </p>
  
  <pre><code>"&lt;a href='delete.php?**id=2**'&gt;Undeleted&lt;/a&gt; ";
  </code></pre>
  
  <p>there should be something like:</p>
  
  <pre><code> "&lt;a href='delete.php?**$_GET['id']'**'&gt;Undeleted&lt;/a&gt; ";
  </code></pre>
  
  <p>or</p>
  
  <pre><code> "&lt;a href='delete.php?**&lt;?php $_GET['id'] ?&gt;**'&gt;Undeleted&lt;/a&gt; ";
  </code></pre>
  
  <p>but in second example it doesn't make sense php inside php. I think I probably just don't know correct syntax.</p>