Echo delete link into php
<p>I have a question regarding a delete function into php.
Consindiring PHP I'm a real noob in this.</p>

<p>I want to make a delete link into a php loop.</p>

<p>This is my home.php:</p>

<pre><code>while($row = $result-&gt;fetch_assoc()) {
    echo "&lt;tr&gt;";
    echo "&lt;td class='info-item'&gt;".$row["userID"]."&lt;/td&gt;";
    echo "&lt;td class='info-item'&gt;".$row["userName"]." &lt;/td&gt;";
    echo "&lt;td class='info-item'&gt;".$row["userLast"]."&lt;/td&gt;";
    echo "&lt;td class='info-item'&gt;".$row["userDegree"]."&lt;/td&gt;";
    echo "&lt;td class='info-item'&gt;".$row["userOrganization"]."&lt;/td&gt;";
    echo "&lt;td class='info-item'&gt;".$row["userIndustry"]."&lt;/td&gt;";
    echo "&lt;td class='info-item'&gt;".$row["userAddress-1"]."&lt;/td&gt;";
    echo "&lt;td class='info-item'&gt;".$row["userAddress-1"]."&lt;/td&gt;";
    echo "&lt;td class='info-item'&gt;&lt;a href='$delete'&gt;Link&lt;/a&gt;&lt;/td&gt;";
}
</code></pre>

<p>This line:</p>

<pre><code>echo "&lt;td class='info-item'&gt;&lt;a href='$delete'&gt;Link&lt;/a&gt;&lt;/td&gt;";
</code></pre>

<p>is not working.</p>

<p>for <code>$delete</code> I use this on top of my script:</p>

<pre><code>$delete = "delete.php";
</code></pre>

<p>It goes to delete.php that looks like this.</p>

<pre><code>ob_start();
include("dbconfig.php");
if(isset($_GET['userID'])!="") {
    $delete=$_GET['userID'];
    $delete=mysql_query("DELETE FROM tbl_users WHERE userID='$delete'");
    if($delete)
        header("Location:index.php");
    else
        echo mysql_error();
}
ob_end_flush();
</code></pre>

<p>But nothing appears to happen regarding the delete of a certain id that I clicked.</p>

<p>Please help.</p>