Klik to gange for at delete
Hey jeg har en tagwall www.daneshea.com/tagwall.php og den har et admin login hvor man kan delete noget fra tagwallen men denne her delete funktion virker naesten. Den skal klikkes paa en gang og saa skal den klikkes paa igen foer den virker. Er der nogen maade at fikse dette paa?tagloginconfirm.php
<?
$password = $_REQUEST["password"];
session_register("password");
?>
<style type="text/css">
table {
border-collapse: collapse;
}
td {
border: 1px solid #000;
}
</style>
<?
$id = $_REQUEST["id"];
if($password == "******") {
include("connect.php");
$result = mysql_query("select id, name, email, message, date_format(time, '%a, %H:%i, %c/%e/%Y') as thetime from tagwall order by time desc");
$query = "DELETE FROM tagwall where id=$id";
mysql_query($query);
while ($row = mysql_fetch_array($result)) {
extract($row);
?>
<html>
<table cellpadding=2>
<tr><td width=50%>Written By: <? echo "$name"; ?></td></tr>
<tr><td width=50%>Day/Time/Date: <? echo "$thetime"; ?></td></tr>
<tr><td width=50%>Email: <? echo "$email"; ?></td></tr>
<tr><td width=50% height=100 cellpadding=10>Message: <? echo "$message"; ?><br><br><p align=left><a href="http://www.daneshea.com/<? echo "tagloginconfirm.php?id=$id&password=$password"; ?>">Delete</a></td></tr></table><br>
</html>
<?
}
}
else {
echo "Incorrect Password <a href=http://www.daneshea.com/tagwall.php>Tagwall</a>";
}
?>