Delete between with a button and $_GET
<p>I'm trying to setup a button that will delete all the rows we loaded on this run but it's not working.</p>

<p>PHP:</p>

<pre><code>if(isset( $_GET['startID'], $_GET['endID']))
{
     $sql_query = "DELETE FROM users WHERE id BETWEEN " .$_GET['startID'] . " AND " . $_GET['endID'] . ";";
     mysql_query($sql_query);
     header("Location: index.php");
}
</code></pre>

<p>Button:</p>

<pre><code>&lt;a onClick="javascript: return confirm('Are you sure?');" href='index.php?startID=&lt;?php echo $firstID; ?&gt;&amp;endID=&lt;?php echo $lastID; ?&gt;'&gt;Delete&lt;/a&gt;
</code></pre>

<p>Button redirects to: <code>index.php?startID=11111&amp;endID=22222</code></p>

<p>The button is passing the values but they're not getting deleted from the database. Can anyone point me to the mistake?</p>