heya everyone...
its been ages since i have played around with codes anyways i really need some help, i have a cpanel for my wapsite which has an option to remove extries from the guestbook, now my issue is this i can only remove one extry at a time and sometimes that takes forever LOL, anyways i want to beable to tick each one i want to remove then click remove, here is the code i am using right now.
its been ages since i have played around with codes anyways i really need some help, i have a cpanel for my wapsite which has an option to remove extries from the guestbook, now my issue is this i can only remove one extry at a time and sometimes that takes forever LOL, anyways i want to beable to tick each one i want to remove then click remove, here is the code i am using right now.
Code:
<?php
include 'GbManager_Header.php';
$Action = Get_QString('Action'); //Requests Postback status from the Querystring.
$Id = Get_QString('Id');
if ($Action == "Remove") {
Show_List(Remove_Message($Id));
} else {
Show_List("False");
}
include 'GbManager_Footer.php';
function Remove_Message($Id) {
$Result = "False";
$DbRes = MySqlCmd("DELETE From page_guestbook WHERE Gbk_Id='$Id'");
if ($DbRes != "1") {
$Result = "Database Error.";
}
return $Result;
}
function Show_List($ShowError) {
$SqlResult = MySqlSelect("Select * From page_guestbook ORDER BY Gbk_Date,Gbk_Time,Gbk_Name");
$RowCnt = mysql_numrows($SqlResult);
$Spacing = " ";
echo $Spacing.'<center>'."\n";
echo $Spacing.'<br>'."\n";
echo $Spacing.'<table border="0" cellpadding="0" cellspacing="0" style="color: #666;font-size:11px;width:550px;">'."\n";
echo $Spacing.' <tr height="15" align="left"><td><span class="Form_Title">Guestbook Messages</span><HR width="100%" SIZE="1"></td></tr>'."\n";
echo $Spacing.'</table>'."\n";
echo $Spacing.'<br>'."\n";
echo $Spacing.'<table border="0" cellpadding="0" cellspacing="1" style="font-size:9pt;width:550px;">'."\n";
echo $Spacing.' <tr style="background-color:#666;color:#FFF;"><td style="background-color:#FFF;color:#FFF;"></td><td><b> Date</b></td><td><b> Time</b></td><td><b> Message</b></td><td align="center"><b>Action</b></td></tr>'."\n";
if ($RowCnt > 0) {
$i = 0;
while ($i < $RowCnt) {
$Gbk_Id = mysql_result($SqlResult,$i,"Gbk_Id");
$Gbk_Date = mysql_result($SqlResult,$i,"Gbk_Date");
$Gbk_Time = mysql_result($SqlResult,$i,"Gbk_Time");
$Gbk_Name = mysql_result($SqlResult,$i,"Gbk_Name");
$Gbk_Message = mysql_result($SqlResult,$i,"Gbk_Message");
$Remove_Link = "Guestbook.php?Action=Remove&Id=$Gbk_Id";
$Spacing = " ";
echo $Spacing.'<tr style="background-color:#F5F5F5;color:#666;">';
echo '<td style="background-color:#FFF;"></td>';
echo '<td style="width:80px;"> '.$Gbk_Date.'</td>';
echo '<td style="width:60px;"> '.$Gbk_Time.'</td>';
echo '<td> <b>'.$Gbk_Name.'</b><br> '.$Gbk_Message.'</td>';
echo '<td align="center" style="width:50px;">';
echo '<table border="0" cellpadding="0" cellspacing="0" style="margin-top:2px;width:38px;height:16px;">';
echo '<tr height="16" align="center"><td>';
echo '<a href="#" onclick="return hs.htmlExpand(this, { headingText: '."'Delete Message'".' })"><img src="Design/Images/Remove.png" title="Remove"></a>';
echo '<div class="highslide-maincontent">';
echo "Are you sure that you want to remove this message? <br><br>";
echo '<a href="'.$Remove_Link.'">Yes</a>';
echo '<b> | </b>';
echo '<a href="#" title="{hs.lang.closeTitle}" onclick="return hs.close(this)">No</a>';
echo "</div>";
echo '</td></tr>';
echo '<tr><td></td></tr>';
echo '</table>';
echo '</td>';
echo "</tr>\n";
$i++;
}
} else {
$Spacing = " ";
echo $Spacing.'<tr><td></td><td><font face="Verdana" size="2"><b>No Entries Found.</b></font><br></td></tr>'."\n";
}
$Spacing = " ";
echo $Spacing."</table><br><br></center>\n";
}
?>

With <form> and check boxes with id of entry within
Comment