I changed it to this and still have to click it twice. Here's my page if you want to test it out. http://dky.sytes.net/kq/
<?
if ((isset($_GET["mode"])) && ($_GET["mode"] == "delete"))
{
$deletequery = "DELETE FROM `$table` WHERE unique_identifier='{$_GET['main_id']}'";
$deleteresult = mysql_query($deletequery) or die(mysql_error().'<br />');
}
while ($row = mysql_fetch_assoc($result)) {
$delete = '<a href="?mode=delete&main_id='.$row['unique_identifier'].'">Delete</a>';
echo "<table cellpadding='3' cellspacing='0' width='100%' border='0' bordercolor='#000000'>
<tr><td style=\"border-top-style: solid; border-top-width: 1\" id='questions'>
- {$row['questions']}</td><td width='50' valign=bottom
style=\"border-top-style: solid; border-top-width: 1\">$delete</td></tr>\n";
}
echo "</table>\n";
?>
I think something's wrong with this part.
if ((isset($_GET["mode"])) && ($_GET["mode"] == "delete"))