שמעו עשיתי מערכת באנים באייפי
ועשיתי עם checkbox
עכשיו אני רוצה לעשות מחיקה מרובה
זה הקוד:
PHP קוד:
<?
include("db.php");
$a= $_GET["a"];
if($a == del){
$check = $_POST['check'];
if(isset($check) == 1) {
mysql_query("DELETE FROM `votes` WHERE `id` = $id");
echo "בלה בלה<br />";
echo "<meta http-equiv=\"refresh\" content=\"2; url=ip.php\">";
}elseif(isset($check) == 0) {
echo"fdfd";
}
}
include "db.php";
$q = mysql_query("select * from votes") or die(mysql_error());
$v = mysql_num_rows($q);
if($v != 0){
echo"
<form id=\"form16\" name=\"form16\" method=\"post\" action=\"?a=del\">
<table width=\"253\" border=\"0\" align=\"center\" dir=\"ltr\">
<tr>
<td align=\"center\"> </td>
<td align=\"center\">IP מחיקת</td>
</tr>
";
while($r= mysql_fetch_array($q)) {
$ip = $r["ip"];
$id = $r["id"];
echo"
<tr>
<td align=\"center\">
<input type=\"checkbox\" name=\"check\" value=\"1\" />
<input name=\"id\" type=\"hidden\" value=\"$id\">
</td>
<td align=\"right\">$ip</td>
</tr>";
}
echo"<tr>
<td align=\"center\"> </td>
<td align=\"center\"><input type=\"submit\" name=\"Submit\" value=\"!סעע חחח\" /></td>
</tr>
</table>
</form>";
}else{
echo"
<center>
הטבלה ריקה
</center>";
}
?>
עכשיו שעשיתי אז זה מוחק רק את הראשון
בבקשת תעזרו כפרות תודה לכם.