View Single Post
ישן 29-12-05, 19:27   # 1
Espires
משתמש בעל גישה מוגבלת
 
מיני פרופיל
תאריך הצטרפות: Dec 2005
הודעות: 233

Espires לא מחובר  

צריך עזרה במחיקה מרובה עם checkboxes

שמעו עשיתי מערכת באנים באייפי
ועשיתי עם 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\">&nbsp;</td>
    <td align=\"center\">IP מחיקת</td>
  </tr>
"
;
while(
$rmysql_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\">&nbsp;</td>
    <td align=\"center\"><input type=\"submit\" name=\"Submit\" value=\"!סעע חחח\" /></td>
  </tr>
</table>
</form>"
;
}else{
echo
"
<center>
הטבלה ריקה
</center>"
;
}
?>
עכשיו שעשיתי אז זה מוחק רק את הראשון
בבקשת תעזרו כפרות תודה לכם.
  Reply With Quote